Skip to content

Commit

Permalink
adjust logging set-up
Browse files Browse the repository at this point in the history
  • Loading branch information
afairless committed Apr 18, 2024
1 parent 8bb9026 commit 0b3a546
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python src/step04_set_up_log_config/set_up_log_configuration.py
python -m pytest
5 changes: 4 additions & 1 deletion src/step04_set_up_log_config/set_up_log_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def main():
log_config_filename = 'log_config.json'
log_config_filepath = (
Path.cwd() / 'src' / 'step05_api' / log_config_filename)
log_filepath = Path.home() / 'Documents' / 'weather_api.log'

log_path = Path.home() / 'Documents'
log_path.mkdir(exist_ok=True, parents=True)
log_filepath = log_path / 'weather_api.log'

log_configuration = {
'version': 1,
Expand Down

0 comments on commit 0b3a546

Please sign in to comment.