[core] Revert prettify unifying the general log level
This change in
The logic does not work, because it compares a logger with a handler
which does not have the same id.
@@ -189,9 +189,9 @@ def basic_logging(proc_name, log_dir=None):
handler.setLevel(lvl)
# Set all loggers but error.log to the same logging level
- error_handler = logging.getLogger('handler_errorlog')
- for h in root_logger.handlers:
- if isinstance(h, (FileHandler, RotatingFileHandler)) and h != error_handler:
+ for h in root_logger.__dict__['handlers']:
+ if isinstance(h, (FileHandler, RotatingFileHandler)):
+ if os.path.basename(h.baseFilename) != 'error.log':
h.setLevel(lvl)
