mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-08 14:05:41 +08:00
GUI: Separate viewer log file from gui app, fixes #126
This commit is contained in:
parent
feef1660c4
commit
63948c7cdf
1 changed files with 7 additions and 3 deletions
|
@ -836,10 +836,14 @@ def _main_gui(viewer_mode: bool):
|
|||
if args.log_file:
|
||||
log_file = args.log_file
|
||||
else:
|
||||
if os.name == "nt":
|
||||
log_file = os.path.join(CURRENT_DIR, "{}.log".format(__intname__))
|
||||
if viewer_mode:
|
||||
app_log_name = "npbackup-viewer"
|
||||
else:
|
||||
log_file = "/var/log/{}.log".format(__intname__)
|
||||
app_log_name = __intname__
|
||||
if os.name == "nt":
|
||||
log_file = os.path.join(CURRENT_DIR, "{}.log".format(app_log_name))
|
||||
else:
|
||||
log_file = "/var/log/{}.log".format(app_log_name)
|
||||
logger = ofunctions.logger_utils.logger_get_logger(log_file, debug=_DEBUG)
|
||||
logger.info("GUI: " + version_string)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue