aboutsummaryrefslogtreecommitdiff
path: root/src/Logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/Logging.py')
-rw-r--r--src/Logging.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Logging.py b/src/Logging.py
index a4af69f7..0b934de4 100644
--- a/src/Logging.py
+++ b/src/Logging.py
@@ -43,11 +43,16 @@ class Log(object):
stdout_handler.setFormatter(formatter)
self.logger.addHandler(stdout_handler)
- file_handler = logging.handlers.TimedRotatingFileHandler(
- location, when="midnight", backupCount=5)
- file_handler.setLevel(LEVELS["trace"])
- file_handler.setFormatter(formatter)
- self.logger.addHandler(file_handler)
+ trace_handler = logging.handlers.TimedRotatingFileHandler(
+ os.path.join(location, "trace.log"), when="midnight", backupCount=5)
+ trace_handler.setLevel(LEVELS["trace"])
+ trace_handler.setFormatter(formatter)
+ self.logger.addHandler(trace_handler)
+
+ warn_handler = logging.FileHandler(os.path.join(location, "warn.log"))
+ warn_handler.setLevel(LEVELS["warn"])
+ warn_handler.setFormatter(formatter)
+ self.logger.addHandler(warn_handler)
def trace(self, message: str, params: typing.List, **kwargs):
self._log(message, params, LEVELS["trace"], kwargs)