From 1aa63e8a0825bc4d1a5cbf3e369d9085acfa3c6c Mon Sep 17 00:00:00 2001 From: Terrtia Date: Mon, 15 May 2023 09:51:10 +0200 Subject: [PATCH] fix: [logger] rename default logger file + fix log messages --- bin/lib/ail_logger.py | 2 +- bin/modules/CreditCards.py | 1 + bin/modules/Global.py | 2 +- bin/modules/Mixer.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/lib/ail_logger.py b/bin/lib/ail_logger.py index 05192ade..34160582 100755 --- a/bin/lib/ail_logger.py +++ b/bin/lib/ail_logger.py @@ -20,7 +20,7 @@ LOGGING_CONFIG = os.path.join(os.environ['AIL_HOME'], 'configs', 'logging.json') def get_config(name=None): if not name: - name = 'ail_warning.log' + name = 'ail.log' else: name = f'{name}.log' with open(LOGGING_CONFIG, 'r') as f: diff --git a/bin/modules/CreditCards.py b/bin/modules/CreditCards.py index e34890b4..e29e42a1 100755 --- a/bin/modules/CreditCards.py +++ b/bin/modules/CreditCards.py @@ -76,6 +76,7 @@ class CreditCards(AbstractModule): if len(all_cards) > 0: # self.logger.debug(f'All matching {all_cards}') creditcard_set = set() + all_cards = set(all_cards) for card in all_cards: print(card) valid_card = self.get_valid_card(card) diff --git a/bin/modules/Global.py b/bin/modules/Global.py index 4cc676df..b9a2cd25 100755 --- a/bin/modules/Global.py +++ b/bin/modules/Global.py @@ -157,7 +157,7 @@ class Global(AbstractModule): # check if file exist if os.path.isfile(filename): - self.logger.warning(f'File already exist {filename}') + self.logger.info(f'File already exist {filename}') print(f'File already exist {filename}') # Check that file already exists but content differs diff --git a/bin/modules/Mixer.py b/bin/modules/Mixer.py index 5e5d744e..49cd3046 100755 --- a/bin/modules/Mixer.py +++ b/bin/modules/Mixer.py @@ -154,7 +154,7 @@ class Mixer(AbstractModule): feeder_name, item_id, gzip64encoded = splitted else: print('Invalid message: not processed') - self.logger.debug(f'Invalid Item: {item_id} not processed') + self.logger.debug(f'Invalid Item: {splitted[0]} not processed') return None # remove absolute path