From 40f0cb19ac186848f69ccae87e899cceb1aa9cf9 Mon Sep 17 00:00:00 2001 From: Sebastian Daza Date: Fri, 13 Dec 2024 10:24:00 +0100 Subject: [PATCH] update --- experiment_utils/experiment_analyzer.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/experiment_utils/experiment_analyzer.py b/experiment_utils/experiment_analyzer.py index 381c477..f87c9d4 100644 --- a/experiment_utils/experiment_analyzer.py +++ b/experiment_utils/experiment_analyzer.py @@ -68,11 +68,15 @@ def __init__( self.logger = logging.getLogger('Experiment Analyzer') self.logger.setLevel(logging.INFO) + self.logger.handlers = [] console_handler = logging.StreamHandler() - formatter = logging.Formatter( - fmt='%(asctime)s - %(message)s', - datefmt='%d/%m/%Y %I:%M:%S %p' + console_handler.setFormatter( + logging.Formatter( + fmt='%(asctime)s - %(message)s', + datefmt='%d/%m/%Y %I:%M:%S %p' + ) ) + self.logger.addHandler(console_handler) console_handler.setFormatter(formatter) self.logger.addHandler(console_handler) self.data = self.__ensure_spark_df(data)