#2560 - Addressing the sys_log bug that could occur when scripts run across two time intervals. Additional updates to network_simulator notebook so that sys_log works in production mode

This commit is contained in:
Charlie Crane
2024-05-20 12:28:02 +01:00
parent dc8105e8d6
commit 103c7f8d39
5 changed files with 23 additions and 10 deletions

View File

@@ -52,7 +52,8 @@ class SysLog:
file_handler.setFormatter(logging.Formatter(log_format))
self.logger = logging.getLogger(f"{self.hostname}_sys_log")
self.logger.handlers.clear() # clear handlers
for handler in self.logger.handlers:
self.logger.removeHandler(handler)
self.logger.setLevel(logging.DEBUG)
self.logger.addHandler(file_handler)