#30553: Misleading logging documentation about disable_existing_loggers default
value
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  darthdragon                        |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:             |        Version:  2.2
  Documentation                      |       Keywords:
               Severity:  Normal     |  disable_existing_loggers logging
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 In the documentation it's stated that:

  "If the disable_existing_loggers key in the LOGGING dictConfig is set to
 True (which is the default) ..."

 But we can see in
 [https://github.com/django/django/blob/master/django/utils/log.py]
 (master branch commit 10b44e4 at the time of writting) that it is set to
 False instead:

 {{{
 ...
 DEFAULT_LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,
     'filters': {
 ...
 }}}

 Moving "(which is the default)" in the paragraph should be enough:

  "If the disable_existing_loggers key in the LOGGING dictConfig is set to
 True then all loggers from the default configuration will be disabled.
 Disabled loggers are not the same as removed; the logger will still exist,
 but will silently discard anything logged to it, not even propagating
 entries to a parent logger. Thus you should be very careful using
 'disable_existing_loggers': True; it’s probably not what you want.
 Instead, you can set disable_existing_loggers to False (which is the
 default) and redefine some or all of the default loggers; or you can set
 LOGGING_CONFIG to None and handle logging config yourself."

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30553>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.e55360455acacbc723c8b33a6aa6ac28%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to