Opened 7 years ago

Closed 7 years ago

#18316 closed Bug (duplicate)

settings.configure() does not apply LOGGING_CONFIG

Reported by: luch@… 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


settings.configure() does not call LOGGING_CONFIG:

import my_settings as S
from django.conf import settings

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

Full sample is in attach

Attachments (1)

test_configure.tgz (566 bytes) - added by luch@… 7 years ago.
shows difference between applying settings

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by luch@…

Attachment: test_configure.tgz added

shows difference between applying settings

comment:1 Changed 7 years ago by Jannis Leidel

Triage Stage: UnreviewedDesign decision needed

Not sure if that's by design, tbh. Needs another set of eyes.

comment:2 Changed 7 years ago by Claude Paroz

Triage Stage: Design decision neededAccepted

This is at least against documentation. Quoted from

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.

comment:3 Changed 7 years ago by Claude Paroz

Resolution: duplicate
Status: newclosed

Just fixed in #14264

Note: See TracTickets for help on using tickets.
Back to Top