zope.app.wsgi doesn't initialize loggers from zope.conf file

Bug #291147 reported by Jonathan Ballet
2
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.server.main.setup() shows that there is two lines of code which do this initialization:

    for logger in options.loggers:
        logger()

I think those lines are missing from zope.app.wsgi. Thanks for fixing this!

Revision history for this message
Jonathan Ballet (jonathan-ballet) wrote :

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.

Revision history for this message
Christian Theune (ctheune) wrote :

The fix was released in zope.app.wsgi 3.9.0 a few days ago.

affects: zope3 → zope.app.wsgi
Changed in zope.app.wsgi:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.