environ['wsgi.errors']? Other solutions such as logging wrapper would be also acceptable...On 5 Aug 2016, at 10:18 PM, Graham Dumpleton <graham.d...@gmail.com> wrote:On 5 Aug 2016, at 9:54 PM, Stefan Nastic <stefan....@gmail.com> wrote:Is there a way to configure the logging with mod_wsgi and Django without losing the request information, such as remote client IP or unique log ID AND without usingenviron['wsgi.errors']? Other solutions such as logging wrapper would be also acceptable...Please also see related SO discussions:Short answer, no.The two basic problems are detailed in:but the solution even for the first is far from simple.The problem is that the request and connection log IDs are only generated the first time a message is logged via the Apache log API. In the case of proxying a request from the Apache child worker process to a daemon mode process, there wouldn’t have been any messages logged and so nothing has triggered the generation of the log IDs. This means they aren’t available to transfer across to the daemon process such that they could be reconstructed into the connection and request records to fake up things so that logging works in daemon mode. A solution may be for mod_wsgi to forcibly cause the generation of the log IDs on every request using an Apache API call, even though they may not be required. The implications of doing this need to be looked at. Alternatively, one works out what seed information from a request is used to generate the log ID so can ensure that is being passed across and added to the fake connection and request objects that the logging will eventually use.
You also keep saying remote client IP doesn’t show. On my testing on MacOS X it does and the client IP is transferred across to daemon mode, so not sure what the issue is there as cannot replicate it at this point.So trying to address even the log ID issues for wsgi.errors is going to take some time and work. Linking messages to stdout/stderr back to requests is going to be even more complicated.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Hi,
I have just tested it (4.5.5) and am still getting the same error.
Best,
Stefan
You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modwsgi/6I2jiEQomh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.
BTW I can also confirm that it works with Python 2, but then of course I get Python exception, since I use Python 3.4 ...
You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modwsgi/6I2jiEQomh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.
Works like a charm :) Thanks Graham.
Could you also maybe briefly describe what the problem was?