Skip to content

Commit

Permalink
Merge pull request #25 from TheTedLab/logging
Browse files Browse the repository at this point in the history
Add logging to modules
  • Loading branch information
TheTedLab authored May 5, 2024
2 parents c34653a + d9ae056 commit 6254d87
Show file tree
Hide file tree
Showing 9 changed files with 2,284 additions and 88 deletions.
30 changes: 30 additions & 0 deletions loguru-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
handlers:
- sink: ext://sys.stdout
format: '[{time:DD-MMM-YYYY HH:mm:ss.SSS}] | {level} | {module}:{function}:{line} - {message}'
backtrace: true
- sink: general.log
format: '[{time:DD-MMM-YYYY HH:mm:ss.SSS}] | {level} | {module}:{function}:{line} - {message}'
backtrace: true
enqueue: true
- sink: different_levels_first.log
format: '[{time:DD-MMM-YYYY HH:mm:ss.SSS}] | {level} | {module}:{function}:{line} - {message}'
filter: {
"": "DEBUG",
"src.aggregator.aggregator": "INFO",
"src.aggregator.artist_aggregate": "WARNING"
}
backtrace: true
enqueue: true
- sink: different_levels_second.log
format: '[{time:DD-MMM-YYYY HH:mm:ss.SSS}] | {level} | {module}:{function}:{line} - {message}'
filter: {
"": "WARNING",
"src.aggregator.aggregator": "WARNING",
"src.aggregator.artist_aggregate": "DEBUG"
}
backtrace: true
enqueue: true
activation:
- [ "", true ]
- [ "aggregator", true ]
- [ "artist_aggregate", true]
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ idna==3.6
iniconfig==2.0.0
isort==5.13.2
lazy-object-proxy==1.10.0
loguru==0.7.2
loguru-config==0.1.0
mccabe==0.7.0
mypy==1.8.0
mypy-extensions==1.0.0
Expand Down
Loading

0 comments on commit 6254d87

Please sign in to comment.