I'm in the midst of converting an application from mod_python to mod_wsgi 
and I'm having an issue with our logging functionality.  We have a 
centralized init function for logging that runs getLogger and sets up the 
file handler object and things like that.  There's also a centralized log 
function that also calls getLogger to write out to the log.  We also have 
two separate namedvirtualhost configs in our global apache config - one for 
localhost for admin type operations and one for the external interface for 
client/customer operations (I have an environment variable in each VH 
config stanza that points to an environment-specific config file that 
identifies the log file for that environment among other things).  I'm 
seeing the application logging to the correct log file for each 
environment, but at times I'm getting duplicate log entries (I've gotten it 
up to x8).  I know it's not actually duplicating the work as I have a 
couple places where I use mkstemp and I'm seeing the same temp file name in 
each duplicated log output.  So, I'm guessing there's something to do with 
how the centralized convenience functions are setting up and calling the 
logging library functions.  Is there any best practice guide on how to do 
logging properly under mod_wsgi?  I should also point out that this setup 
works under mod_python/python2.4 (vs mod_wsig/python2.7).

Thanks,
Jared

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/cdedca07-b5fb-4e58-a16f-661c2a5a2251%40googlegroups.com.

Reply via email to