Re: [Repoze-dev] bfg logging configuration through the INI file under mod_wsgi

2011-04-07 Thread Alex Marandon

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,
Alex
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] bfg logging configuration through the INI file under mod_wsgi

2011-04-04 Thread Wichert Akkerman

On 2011-4-4 19:19, Alex Marandon wrote:

Hi,

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.


Wichert.

--
Wichert AkkermanIt is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] bfg logging configuration through the INI file under mod_wsgi

2011-04-04 Thread Alex Marandon

Hi,

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. When i run the app 
with paster, my INI logging config is taken into account and when I 
configure logging programmatically, I do get log messages into the 
apache log file. It looks like the INI logging config is not taken into 
account under mod_wsgi. I remember getting that working under Pylons and 
as far as I understand this stuff is handled by Paste Deploy, so I don't 
see why it wouldn't work with bfg. I can always stick to programmatic 
configuration, but I thought I'd ask in case i'm missing something...


Thanks,
Alex
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev