overriding a few more log levels for acceptance tests

This commit is contained in:
Christine Lytwynec
2014-07-09 16:59:46 -04:00
parent eefa18b393
commit cd580ac247
2 changed files with 23 additions and 12 deletions

View File

@@ -24,15 +24,19 @@ import os
def seed():
return os.getppid()
# Suppress error message "Cannot determine primary key of logged in user"
# from track.middleware that gets triggered when using an auto_auth workflow
# This is an ERROR level warning so we need to set the threshold at CRITICAL
logging.getLogger('track.middleware').setLevel(logging.CRITICAL)
# Silence noisy logs
LOG_OVERRIDES = [
('track.middleware', logging.CRITICAL),
('codejail.safe_exec', logging.ERROR),
('edx.courseware', logging.ERROR),
('edxmako.shortcuts', logging.ERROR),
('audit', logging.ERROR),
('contentstore.views.import_export', logging.CRITICAL),
('xmodule.x_module', logging.CRITICAL),
]
# Suppress warning message "Cannot find corresponding link for name: <foo>"
# from edxmako.shortcuts. We have no appropriate pages in the platform to
# use, so these are not set up for TOS and PRIVACY
logging.getLogger('edxmako.shortcuts').setLevel(logging.ERROR)
for log_name, log_level in LOG_OVERRIDES:
logging.getLogger(log_name).setLevel(log_level)
update_module_store_settings(
MODULESTORE,

View File

@@ -27,10 +27,17 @@ import string
def seed():
return os.getppid()
# Suppress error message "Cannot determine primary key of logged in user"
# from track.middleware that gets triggered when using an auto_auth workflow
# This is an ERROR level warning so we need to set the threshold at CRITICAL
logging.getLogger('track.middleware').setLevel(logging.CRITICAL)
# Silence noisy logs
LOG_OVERRIDES = [
('track.middleware', logging.CRITICAL),
('codejail.safe_exec', logging.ERROR),
('edx.courseware', logging.ERROR),
('audit', logging.ERROR),
('instructor_task.api_helper', logging.ERROR),
]
for log_name, log_level in LOG_OVERRIDES:
logging.getLogger(log_name).setLevel(log_level)
update_module_store_settings(
MODULESTORE,