#18993: Default django logging to StreamHandler (when DEBUG=True)
------------------------------+--------------------------------------
     Reporter:  claudep       |                    Owner:  nobody
         Type:  New feature   |                   Status:  new
    Component:  Core (Other)  |                  Version:  master
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------

Comment (by ptone):

 Looking at this - it seems we should be leveraging the settings.LOGGING
 dictConfig more.

 The current module level code basically ensures that our 'django' logger
 exists in some minimum form.

 What we are talking about for both this, and the deprecation warnings, is
 some degree of implicit config requirement if something isn't explicitly
 specified.

 Meaning that even if we put the handler in the project template's
 settings.py dictConfig - deleting it does not remove the behavior, if you
 don't want it, you have to explicitly set it to a null handler.

 Generally this kind of "I didn't ask for this, why are you giving it to
 me" approach isn't desirable.

 I actually think the case for this behavior is stronger for deprecation.
 That is, if you want to silence warnings, you have to do it explicitly.
 However for the 'django' named handler, I think it is a harder sell.  I'd
 be more inclined to set the default dictConfig for new projects to use the
 streamhandler (with the DEBUG check) by default, and if the handler is
 removed from the project's settings.py file, just ensure that a null
 handler exists for the logger as is currently done.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18993#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to