Actually… I'm failing to imagine a scenario where such a change would lead 
to any bad things:

- If `disable_existing_loggers` is True, the incompatibility would manifest 
itself in Django loggers not being silenced, provided the user has defined 
a root logger. Which is probably the intended behavior, and I'm having a 
hard time imagining someone actually relying on it. Most probably users 
currently work around it either by doing their own config from scratch, or 
by redefining Django loggers, both of which will continue working after the 
change.

- If `disable_existing_loggers` is explicitly set to False, then we could 
initialize them as we do now.

How does that sound?

On Tuesday, September 6, 2016 at 5:44:37 PM UTC-7, Carl Meyer wrote:
>
> On 09/06/2016 04:57 PM, Ivan Sagalaev wrote: 
> > I'm 
> > talking about this function: 
> > https://github.com/django/django/blob/master/django/utils/log.py#L66 
> > 
> > When `LOGGING_CONFIG` isn't explicitly disabled it first unconditionally 
> > initializes logging with the hard-coded configuration and then applies a 
> > user one, if present. And the latter can't really neutralize the effect 
> > of the former. 
>
> FWIW I agree that the current behavior here is broken and should be 
> fixed. The design seems to be based in an assumption that 
> `disable_existing_loggers=True` can "undo" the effects of the previous 
> config, when it can't, and in fact it does something much nastier -- it 
> silences all previously-created loggers. 
>
> I clearly recall outlining this issue in a Trac ticket at some point 
> quite a while ago, but I can't seem to find that ticket now. 
>
> Fixing this in a way that doesn't change logging behavior for projects 
> upgrading from a previous Django version may be tricky, unless we gate 
> the effect of the change on (yet another) setting. 
>
> Carl 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/78325f82-badf-4e75-9206-be244a8e9cfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to