Commit ae51999a authored by Link Mauve's avatar Link Mauve

Disable unused logging levels, makes logging.debug about 25 times faster.

parent aed82a0e
......@@ -620,6 +620,7 @@ def setup_logging():
'filename': path.join(LOG_DIR, 'errors.log'),
'formatter': 'simple',
}
logging.disable(logging.WARNING)
if options.debug:
LOGGING_CONFIG['root']['handlers'].append('debug')
......@@ -629,11 +630,13 @@ def setup_logging():
'filename': options.debug,
'formatter': 'simple',
}
logging.disable(logging.NOTSET)
if LOGGING_CONFIG['root']['handlers']:
logging.config.dictConfig(LOGGING_CONFIG)
else:
logging.disable(logging.ERROR)
logging.basicConfig(level=logging.CRITICAL)
global log
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment