Browse Source

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

Christopher Conner 9 years ago
parent
commit
d92810d027
1 changed files with 4 additions and 0 deletions
  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():