[Django] #36958: Reload logging when logging setting changed

2 views
Skip to first unread message

Django

unread,
Feb 27, 2026, 6:10:51 AM (yesterday) Feb 27
to django-...@googlegroups.com
#36958: Reload logging when logging setting changed
-----------------------------+-----------------------------------------
Reporter: Jake Howard | Type: Uncategorized
Status: new | Component: Core (Other)
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+-----------------------------------------
When changing the `LOGGING` setting (eg in tests), `logging` config isn't
reconfigured to match.

This can be fairly easily added in a project:

{{{#!python
@receiver(setting_changed)
def reload_logging_config(*, setting: str, **kwargs: Any) -> None:
if setting in {"LOGGING", "LOGGING_CONFIG"}:
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
}}}

But it would be nice if this was handled by default. This snippet appears
to do what I need, but there might be edge cases I've not considered.
--
Ticket URL: <https://code.djangoproject.com/ticket/36958>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages