Django commands for working with configglue generated settings

The django logging schema should not include a 'root' logger

Reported by Māris Fogels on 2012-04-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-configglue
Undecided
Unassigned

Bug Description

The django schema should not define a 'root' logger section. The section forces configglue users to define a 'root' logger section if they want to define their own logging, but the root logger does not actually do anything.

Presumably the 'root' logger section configures the root logger, but a Django shell shows that the root logger is not the /real/ Python logging root logger. It just adds a logger that happens to be named 'root':

 $ python project/manage.py shell
 >>> import logging
 >>> root_logger = logging.getLogger()
 >>> configglue_root_logger = logging.getLogger('root')
 >>> root_logger is configglue_root_logger
 False

I searched the django configuration sources and did not find any reference to or special treatment of a logger named 'root'.

Māris Fogels (mars) wrote :

According to http://docs.python.org/library/logging.config.html#configuration-dictionary-schema, there is special treatment for the 'root' key in the Python logging dictionary config. Configuring that key should configure the real root logger. Quick testing in the Django shell shows this to be true: setting the log level of the root logger in a django_configglue config file changes the log level of the real root logger to match.

I'm closing this as invalid.

Changed in django-configglue:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers