zulip/zproject
Greg Price b095463f9b logging: Clear out the Django default config on logger `django`.
By default, Django sets up two handlers on this logger, one of them
its AdminEmailHandler.  We have our own handler for sending email on
error, and we want to stick to that -- we like the format somewhat
better, and crucially we've given it some rate-limiting through
ZulipLimiter.

Since we cleaned out our logging config in e0a5e6fad, though, we've
been sending error emails through both paths.  The config we'd had
before that for `django` was redundant with the config on the root --
but having *a* config there was essential for causing
`logging.config.dictConfig`, when Django passes it our LOGGING dict,
to clear out that logger's previous config.  So, give it an empty
config.

Django by default configures two loggers: `django` and
`django.server`.  We have our own settings for `django.server`
anyway, so this is the only one we need to add.

The stdlib `logging` and `logging.config` docs aren't 100% clear, and
while the source of `logging` is admirably straightforward the source
of `logging.config` is a little twisty, so it's not easy to become
totally confident that this has the right effect just by reading.
Fortunately we can put some of that source-diving to work in writing
a test for it.
2017-10-12 22:45:14 -07:00
..
jinja2 zproject: Remove absolute_import. 2017-09-27 20:20:07 -07:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py backends: Create custom email backend EmailLogBackEnd. 2017-10-04 08:20:29 -07:00
dev_settings.py passwords: Express the quality threshold as guesses required. 2017-10-08 15:48:44 -07:00
dev_urls.py test_emails: Generate emails instead of hardcoding. 2017-09-26 15:02:47 -07:00
legacy_urls.py urls: Move the json/tutorial_status endpoint to be an API-style route. 2017-10-09 15:13:33 -07:00
prod_settings_template.py passwords: Set default zxcvbn threshold to 10k guesses. 2017-10-08 15:48:44 -07:00
settings.py logging: Clear out the Django default config on logger `django`. 2017-10-12 22:45:14 -07:00
terms.md.template Add TERMS_OF_SERVICE setting. 2016-07-29 20:47:31 -07:00
test_settings.py tests: Don't use caching session engine in tests. 2017-10-06 12:22:20 -07:00
urls.py errors: Force a super-simpler handler for 400 errors. 2017-10-11 20:43:36 -07:00
wsgi.py python: Add lint rule banning 'from os.path import'. 2017-09-22 04:55:38 -07:00