#20229: Django 1.5 calls the LOGGING_CONF function twice
-------------------------------+--------------------------------------
     Reporter:  lsaffre        |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Core (Other)   |                  Version:  1.5
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by poirier):

 * status:  closed => new
 * resolution:  worksforme =>


Comment:

 I think I can clarify why this is a problem.

 Using Django settings, there's no simple way to completely override the
 default Django logging configuration, because in Python, once a logging
 config has been applied, applying another one only updates the current
 configuration, it does not replace it.  So if you want to completely
 control the logging configuration using the Django settings, you have to
 track down what the default Django logging configuration is and be careful
 to specify your own versions of every logger in the default configuration
 that doesn't happen to be exactly what you want. (And that's not even
 going into what happens if you set disable_existing_loggers to True.)

 It would be much, much simpler if Django just applied the logging
 configuration in settings.LOGGING, if any, and only used its own default
 if LOGGING was not set otherwise. That would make it possible to set
 exactly the logging configuration you want using Django settings, and
 would also work the same way as most other Django settings.

--
Ticket URL: <https://code.djangoproject.com/ticket/20229#comment:6>
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/065.23d368776040d273ecda1cbed829dd76%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to