fix: [logger] rename default logger file + fix log messages

This commit is contained in:
Terrtia 2023-05-15 09:51:10 +02:00
parent e365555905
commit 1aa63e8a08
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
4 changed files with 4 additions and 3 deletions

View file

@ -20,7 +20,7 @@ LOGGING_CONFIG = os.path.join(os.environ['AIL_HOME'], 'configs', 'logging.json')
def get_config(name=None): def get_config(name=None):
if not name: if not name:
name = 'ail_warning.log' name = 'ail.log'
else: else:
name = f'{name}.log' name = f'{name}.log'
with open(LOGGING_CONFIG, 'r') as f: with open(LOGGING_CONFIG, 'r') as f:

View file

@ -76,6 +76,7 @@ class CreditCards(AbstractModule):
if len(all_cards) > 0: if len(all_cards) > 0:
# self.logger.debug(f'All matching {all_cards}') # self.logger.debug(f'All matching {all_cards}')
creditcard_set = set() creditcard_set = set()
all_cards = set(all_cards)
for card in all_cards: for card in all_cards:
print(card) print(card)
valid_card = self.get_valid_card(card) valid_card = self.get_valid_card(card)

View file

@ -157,7 +157,7 @@ class Global(AbstractModule):
# check if file exist # check if file exist
if os.path.isfile(filename): 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}') print(f'File already exist {filename}')
# Check that file already exists but content differs # Check that file already exists but content differs

View file

@ -154,7 +154,7 @@ class Mixer(AbstractModule):
feeder_name, item_id, gzip64encoded = splitted feeder_name, item_id, gzip64encoded = splitted
else: else:
print('Invalid message: not processed') 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 return None
# remove absolute path # remove absolute path