On Nov 15, 12:20 pm, PyDevler <[EMAIL PROTECTED]> wrote: > I am currently running pylons using mod_wsgi, as a daemon process > running as a separate user from apache. I am having problems logging > to anything under mod_wsgi. Any special config needed to log under > mod_wsgi. The logging works fine as a separate process, however not > using mod_wsgi. Any Ideas?
Logging using what? Where would the log output normally go to when you are running the application in standalone process? If the logging system you are using is trying to output to sys.stdout, then you will need to configure mod_wsgi to allow that, as writing to sys.stdout by WSGI applications is not portable, so to discourage people doing that in WSGI applications mod_wsgi doesn't allow you to do it by default. It should raise a Python exception if you try, but your logging system may well be catching them and ignoring them. Your logging system may also be getting confused because of sys.stdout not actually being the original Python sys.stdout object but a wrapper around Apache error log. Presuming that sys.stdout was being used, once enabled the output would then end up in the Apache error log. Whether it will end up in the main Apache error log or a virtual host specific error log will depend on how you have configured Apache. As output is sent to Apache error log as 'error' level, you need to ensure Apache LogLevel directive is set with a sensible value so as to ensure that 'error' level output is being output. By default it should, but if it has been changed to be more restrictive it wouldn't. If not using sys.stdout but a file of your own as output for logging, also be aware that you can't use relative path names for files as when using Apache there isn't really a guarantee about what the working directory of your application will be. That all said, can you please provide a minimal code example which shows how you are logging stuff, preferably something that could be run to try and duplicate the problem. For further reading on restrictions on sys.stdout under mod_wsgi and other material about logging with mod_wsgi, plus issues related to user permissions and working directories of applications, ensure you have read: http://code.google.com/p/modwsgi/wiki/ApplicationIssues http://code.google.com/p/modwsgi/wiki/DebuggingTechniques BTW, the mod_wsgi mailing list/group is at: http://groups.google.com/group/modwsgi Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---