From aed1a85b20abcf78221a81fbab610adf46dcefc4 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 27 Sep 2021 13:07:39 +0200 Subject: [PATCH] fix logpath --- src/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.py b/src/util.py index 9ba4842..8ea8057 100644 --- a/src/util.py +++ b/src/util.py @@ -64,7 +64,7 @@ def setupLogger(lvl="DEBUG"): global log # Needed to log exceptions in src\util log = logging.getLogger() - logpath = r".\log\myTS3.log" + logpath = os.path.dirname(os.path.abspath(__file__)) + r"\log\myTS3.log" if not os.path.exists(os.path.dirname(logpath)): os.makedirs(os.path.dirname(logpath)) handler = RotatingFileHandler(logpath, encoding='utf-8', maxBytes=5*1024*1024, backupCount=10)