Update log.py

This commit is contained in:
SpudGunMan
2024-11-25 11:46:22 -08:00
parent 520d58b262
commit 669a891eeb
+2 -2
View File
@@ -64,14 +64,14 @@ logger.addHandler(stdout_handler)
if syslog_to_file:
# Create file handler for logging to a file
file_handler_sys = TimedRotatingFileHandler('logs/meshbot{}.log'.format(today.strftime('%Y_%m_%d')), when='midnight', backupCount=log_backup_count)
file_handler_sys = TimedRotatingFileHandler('logs/meshbot.log', when='midnight', backupCount=log_backup_count)
file_handler_sys.setLevel(logging.DEBUG) # DEBUG used by default for system logs to disk
file_handler_sys.setFormatter(plainFormatter(logFormat))
logger.addHandler(file_handler_sys)
if log_messages_to_file:
# Create file handler for logging to a file
file_handler = TimedRotatingFileHandler('logs/messages{}.log'.format(today.strftime('%Y_%m_%d')), when='midnight', backupCount=log_backup_count)
file_handler = TimedRotatingFileHandler('logs/messages.log', when='midnight', backupCount=log_backup_count)
file_handler.setLevel(logging.INFO) # INFO used for messages to disk
file_handler.setFormatter(logging.Formatter(msgLogFormat))
msgLogger.addHandler(file_handler)