Log to local dir in Windows by default

This commit is contained in:
deajan 2024-08-19 22:52:18 +02:00
parent 9d793a66ed
commit fb86a007b2
2 changed files with 2 additions and 2 deletions

View file

@ -286,7 +286,7 @@ This is free software, and you are welcome to redistribute it under certain cond
log_file = args.log_file
else:
if os.name == "nt":
log_file = os.path.join(gettempdir(), "{}.log".format(__intname__))
log_file = os.path.join(CURRENT_DIR, "{}.log".format(__intname__))
else:
log_file = "/var/log/{}.log".format(__intname__)

View file

@ -710,7 +710,7 @@ def _main_gui(viewer_mode: bool):
log_file = args.log_file
else:
if os.name == "nt":
log_file = os.path.join(gettempdir(), "{}.log".format(__intname__))
log_file = os.path.join(CURRENT_DIR, "{}.log".format(__intname__))
else:
log_file = "/var/log/{}.log".format(__intname__)
logger = ofunctions.logger_utils.logger_get_logger(log_file, debug=_DEBUG)