The django logging schema should not include a 'root' logger
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
django-configglue |
Invalid
|
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 is configglue_
False
I searched the django configuration sources and did not find any reference to or special treatment of a logger named 'root'.
According to http:// docs.python. org/library/ logging. config. html#configurat ion-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.