#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019c9ecb2fdc-e2ccf535-30e5-47d1-b6be-9112263c4fb2-000000%40eu-central-1.amazonses.com.

Reply via email to