commit | 07b91a7a91ed7644c8a12e60398420402ffaf290 | [log] [tgz] |
---|---|---|
author | Tang Cheng <cheng.tang@supwisdom.com> | 周一 11月 19 12:52:17 2012 +0800 |
committer | Tang Cheng <cheng.tang@supwisdom.com> | 周一 11月 19 12:52:17 2012 +0800 |
tree | 2e8a61b1b592ea945d6ef89450df1bdf1f18c4d3 | |
parent | c91a5fc1851cebfeae06331b297964f349a1cbec [diff] |
增加日志级别
diff --git a/tcutils/loghelper.py b/tcutils/loghelper.py index 5bebb21..7011cef 100644 --- a/tcutils/loghelper.py +++ b/tcutils/loghelper.py
@@ -71,6 +71,7 @@ def setup_logger(**kwargs): level = kwargs.get('log_level', 'info') level_str = dict(info=logging.INFO, debug=logging.DEBUG, - error=logging.ERROR) + error=logging.ERROR, warning=logging.WARNING, + critical=logging.CRITICAL) logging.getLogger().setLevel(level_str.get(level, logging.INFO)) _enable_pretty_logging(**kwargs)