mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 15:57:34 +00:00
Add '.log' suffix to log files. By @bigtedde (#1710)
This commit is contained in:
parent
43140beda1
commit
cff00ad8e1
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,8 @@ def init_logger(background=False):
|
||||||
|
|
||||||
# create handlers
|
# create handlers
|
||||||
fh = TimedRotatingFileHandler(config.LOG_DIR / 'vorta.log', when='d', interval=1, backupCount=5)
|
fh = TimedRotatingFileHandler(config.LOG_DIR / 'vorta.log', when='d', interval=1, backupCount=5)
|
||||||
|
# ensure ".log" suffix
|
||||||
|
fh.namer = lambda log_name: log_name.replace(".log", "") + ".log"
|
||||||
fh.setLevel(logging.DEBUG)
|
fh.setLevel(logging.DEBUG)
|
||||||
fh.setFormatter(formatter)
|
fh.setFormatter(formatter)
|
||||||
logger.addHandler(fh)
|
logger.addHandler(fh)
|
||||||
|
|
Loading…
Reference in a new issue