On 05/04/11 03:57, Wichert Akkerman wrote:
On 2011-4-4 19:19, Alex Marandon wrote:

Has anyone had any success configuring logging through the main INI file
with bfg under mod_wsgi? I keep getting 'No handlers could be found for
logger "myapp.mymodule"' messages in apache log file.

http://pypi.python.org/pypi/collective.recipe.modwsgi does that for you. If you are not using buildout you will need to add the necessary code to your own wsgi wrapper script.

I was erroneously thinking that loadapp() was enough for the logging config to be automatically taken into account, but it's not the case. I needed to call paste.script.util.logging_config.fileConfig() too. This is what collective.recipe.modwsgi and the code pointed out by Daniel do as well.

Many thanks,
Repoze-dev mailing list

Reply via email to