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)