mirror of https://github.com/zulip/zulip.git
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:
parent
80a9253f89
commit
e8ab7cd1a9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue