瀏覽代碼

[core] Set all loggers to debug when debug is ON

Christopher Conner 9 年之前
父節點
當前提交
d92810d
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      desktop/core/src/desktop/log/__init__.py

+ 4 - 0
desktop/core/src/desktop/log/__init__.py

@@ -175,6 +175,10 @@ def basic_logging(proc_name, log_dir=None):
       handler.setFormatter(logging.Formatter(LOG_FORMAT, DATE_FORMAT))
       root_logger.addHandler(handler)
     handler.setLevel(lvl)
+    for h in root_logger.__dict__['handlers']:
+      if h.__class__.__name__ == 'FileHandler' or h.__class__.__name__ == 'RotatingFileHandler':
+        if h.baseFilename.split('/')[-1] != 'error.log':
+          h.setLevel(lvl)
 
 
 def fancy_logging():