Opened 12 years ago
Closed 12 years ago
#18316 closed Bug (duplicate)
settings.configure() does not apply LOGGING_CONFIG
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | 1.4 |
Severity: | Normal | Keywords: | settings configure |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
settings.configure() does not call LOGGING_CONFIG:
import my_settings as S from django.conf import settings settings.configure(S)
While touching settings attribute like management.get_commands() does implicit call:
import os os.environ["DJANGO_SETTINGS_MODULE"] = "my_settings" from django.conf import settings settings.INSTALLED_APPS
Full sample is in attach
Attachments (1)
Change History (4)
by , 12 years ago
Attachment: | test_configure.tgz added |
---|
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
Not sure if that's by design, tbh. Needs another set of eyes.
comment:2 by , 12 years ago
Triage Stage: | Design decision needed → Accepted |
---|
This is at least against documentation. Quoted from https://docs.djangoproject.com/en/dev/topics/logging/#configuring-logging:
Logging is configured as soon as settings have been loaded (either manually using configure() or when at least one setting is accessed). Since the loading of settings is one of the first things that Django does, you can be certain that loggers are always ready for use in your project code.
I think this should be fixed.
shows difference between applying settings