#18243: Management shell should make it easy to force LOGGING_CONFIG=None
-------------------------------------+-------------------------------------
Reporter: ncoghlan@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.3
commands) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ncoghlan@…):
Sure, that's another workaround that fixes it *for me* (FWIW, I actually
plan to deploy the standard workaround for my own application and use a
separate settings module to switch off the logging configuration entirely
for the management API). However, I'm definitely not the only one
encountering this problem and for someone not already fairly familiar with
the logging system, the errors you see in this case are completely
baffling. The default behaviour even breaks the output for *--help* if
there's a problem with creating a logging handler (as shown in my original
message).
The problem is really that activating the logging should be limited to
commands where it's appropriate (e.g. runserver, test) and similarly
"active" entry points, but that's not what happens: enabling the logging
is entirely implicit in importing django.conf, a behaviour *explicitly*
recommended against in the logging documentation
(http://docs.python.org/howto/logging.html#configuring-logging-
for-a-library).
"But Django's a framework, not a library" is no defence: merely
*importing* something should not have side effects of that magnitude, it
should require an active call.
--
Ticket URL: <https://code.djangoproject.com/ticket/18243#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.