summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-07-30 00:51:33 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-07-30 12:59:58 +0100
commitae51999a6f004cfc20f5eb3b4ce289136193d779 (patch)
tree61a9c61c83e7115f7a46edb65ef33eeee366134d
parentaed82a0e3b24a337e42f0487a5617dcf77c9f9e1 (diff)
downloadpoezio-ae51999a6f004cfc20f5eb3b4ce289136193d779.tar.gz
poezio-ae51999a6f004cfc20f5eb3b4ce289136193d779.tar.bz2
poezio-ae51999a6f004cfc20f5eb3b4ce289136193d779.tar.xz
poezio-ae51999a6f004cfc20f5eb3b4ce289136193d779.zip
Disable unused logging levels, makes logging.debug about 25 times faster.
-rw-r--r--poezio/config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 85fc5750..91e82268 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -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