mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-07 10:55:40 +00:00
Log file doesn't need to exist before logger can log to it
This commit is contained in:
parent
444be2c060
commit
558279e009
@ -27,7 +27,7 @@ class logger(object):
|
|||||||
# set request requests module log level
|
# set request requests module log level
|
||||||
logging.getLogger("requests").setLevel(logging.CRITICAL)
|
logging.getLogger("requests").setLevel(logging.CRITICAL)
|
||||||
|
|
||||||
if self.logfile and os.path.isfile(self.logfile):
|
if self.logfile:
|
||||||
# define handler to log into file
|
# define handler to log into file
|
||||||
file_log_handler = logging.FileHandler(self.logfile)
|
file_log_handler = logging.FileHandler(self.logfile)
|
||||||
logger.addHandler(file_log_handler)
|
logger.addHandler(file_log_handler)
|
||||||
|
Loading…
Reference in New Issue
Block a user