Skip to content

Commit

Permalink
refactor: use the python filename as a name for the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdelkrim Boujraf committed Jun 24, 2020
1 parent 3749877 commit 22f6cba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions altf1be_helpers/altf1be_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,9 @@ def daterange(start_date, end_date):
f'parse_requirements : {AltF1BeHelpers.parse_requirements("requirements.txt")}'
)

log_filename = AltF1BeHelpers.create_append_log_file("altf1be_helpers.py.log")
log_filename = AltF1BeHelpers.create_append_log_file(f"{os.path.basename(__file__)}.log")

logging.basicConfig(
filename=log_filename,
level=logging.INFO
)

logging.info("AltF1BeHelpers log is created!")
)

0 comments on commit 22f6cba

Please sign in to comment.