Opened 12 years ago

Closed 12 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

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)

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

Download all attachments as: .zip

Change History (4)

by luch@…, 12 years ago

Attachment: test_configure.tgz added

shows difference between applying settings

comment:1 by Jannis Leidel, 12 years ago

Triage Stage: UnreviewedDesign decision needed

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

comment:2 by Claude Paroz, 12 years ago

Triage Stage: Design decision neededAccepted

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.

comment:3 by Claude Paroz, 12 years ago

Resolution: duplicate
Status: newclosed

Just fixed in #14264

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