zope.app.wsgi doesn't initialize loggers from zope.conf file
Bug #291147 reported by
Jonathan Ballet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.app.wsgi |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The config() function from zope.app.wsgi package process directives from a zope.conf file.
In this file, it's possible to add custom loggers, which should be initialized upon server startup, as well as the eventlog directive. However, the config() function doesn't initialize those loggers, despite they have been correctly configured and recognized (note that this is _not_ the case for the eventlog).
Looking at the equivalent code from zope.app.
for logger in options.loggers:
logger()
I think those lines are missing from zope.app.wsgi. Thanks for fixing this!
To post a comment you must log in.
Here is a patch which fix the problem, at least for <logger> directives.
However, I just saw there is the same problem for the accesslog options (which is not initialized in zope.app.wsgi). It seems to be an optional directive from zope.conf, I don't know if it should be always initialized or not.