Opened 4 years ago

Closed 4 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@… 4 years ago.
shows difference between applying settings

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by luch@…

shows difference between applying settings

comment:1 Changed 4 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

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

comment:2 Changed 4 years ago by claudep

  • Triage Stage changed from Design decision needed to Accepted

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 4 years ago by claudep

  • Resolution set to duplicate
  • Status changed from new to closed

Just fixed in #14264

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