logging: Fix zulip.send_email log being printed in tests.

Our set_loglevel tool didn't set propagate to False, so just using it
directly wouldn't work unless the logger is explcitly declared in
zproject/settings.py, which this one isn't.
This commit is contained in:
Tim Abbott 2017-10-27 15:34:36 -07:00
parent 80a9253f89
commit e8ab7cd1a9
1 changed files with 2 additions and 0 deletions

View File

@ -114,10 +114,12 @@ else:
def set_loglevel(logger_name, level):
LOGGING['loggers'].setdefault(logger_name, {})['level'] = level
LOGGING['loggers'].setdefault(logger_name, {})['propagate'] = False
set_loglevel('zulip.requests', 'CRITICAL')
set_loglevel('zulip.management', 'CRITICAL')
set_loglevel('django.request', 'ERROR')
set_loglevel('fakeldap', 'ERROR')
set_loglevel('zulip.send_email', 'ERROR')
# Enable file:/// hyperlink support by default in tests
ENABLE_FILE_LINKS = True