Unable to use logging.config.fileConfig

Bug #1217290 reported by Michael Nelson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-configglue
New
Undecided
Unassigned

Bug Description

According to the docs [1] Django's LOGGING setting is an (unspecified) data-structure - "The contents of this data structure will be passed as the argument to the configuration method described in LOGGING_CONFIG."

It defaults to a dict because the default method for LOGGING_CONFIG is django.utils.log.dictConfig. But if you want to use LOGGING_CONFIG = 'logging.config.fileConfig' you need to specify a string path in the LOGGING setting, which doesn't match the schema.

That said, I don't understand how django itself does this, as it passes DEFAULT_CONFIG (a dict) to the specified config method before using the custom LOGGING_CONFIG [2]

As a work-around, I'm calling the logging configuration in my settings.py after configglue has parsed the settings.

[1] https://docs.djangoproject.com/en/1.5/ref/settings/#std:setting-LOGGING
[2] https://github.com/django/django/blob/master/django/conf/__init__.py#L67

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.