mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: [logger] rename default logger file + fix log messages
This commit is contained in:
parent
e365555905
commit
1aa63e8a08
4 changed files with 4 additions and 3 deletions
|
@ -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:
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue