#20229: Django 1.5 calls the LOGGING_CONF function twice
-------------------------------+--------------------------------------
Reporter: lsaffre | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | 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
-------------------------------+--------------------------------------
Comment (by lsaffre):
I don't have a problem, I discovered a detail where Django can get better
and am trying to share it.
The docs say that "the project’s logging configuration is merged with
Django’s defaults", but if you
look at the code, then Django doesn't merge anything, it calls a function
twice.
I cannot imagine any meaningful usage for what Django is doing there since
version 1.5:
if self.LOGGING_CONFIG:
logging_config_func(DEFAULT_LOGGING)
if self.LOGGING:
logging_config_func(self.LOGGING)
I'd rather suggest something like:
if self.LOGGING_CONFIG:
config = dict()
config.update(DEFAULT_LOGGING)
if self.LOGGING:
config.update(self.LOGGING)
logging_config_func(config)
--
Ticket URL: <https://code.djangoproject.com/ticket/20229#comment:2>
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].
For more options, visit https://groups.google.com/groups/opt_out.