From 82053e81318eefd148c6b87c37812529323dac26 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 27 Sep 2021 13:32:38 +0200 Subject: [PATCH] fix logpath for real 2 --- myTS3.py | 2 +- src/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/myTS3.py b/myTS3.py index 31b9fe1..f02b88b 100644 --- a/myTS3.py +++ b/myTS3.py @@ -481,7 +481,7 @@ class TSbot: def main(): # Start logger - logpath = os.path.dirname(os.path.abspath(__file__)) + r"\log" + logpath = os.path.dirname(os.path.abspath(__file__)) + r"/log" log = util.setupLogger(logpath) # Log unhandled exception diff --git a/src/util.py b/src/util.py index a5b4c00..b20f9af 100644 --- a/src/util.py +++ b/src/util.py @@ -66,7 +66,7 @@ def setupLogger(logpath, lvl="DEBUG"): log = logging.getLogger() if not os.path.exists(logpath): os.makedirs(logpath) - handler = RotatingFileHandler(logpath + r"\myTS3.log", encoding='utf-8', maxBytes=5*1024*1024, backupCount=10) + handler = RotatingFileHandler(logpath + r"/myTS3.log", encoding='utf-8', maxBytes=5*1024*1024, backupCount=10) logformat = logging.Formatter("%(asctime)s %(levelname)7s %(message)s", "%Y-%m-%d %H:%M:%S") handler.setFormatter(logformat) log.addHandler(handler)