Skip to content

Commit

Permalink
Update logging.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aalexfvk authored Sep 27, 2023
1 parent 8907743 commit 596611f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ch_backup/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def configure(config_loguru: dict) -> None:

if "filter" in value:
handler["filter"] = value["filter"]
# https://loguru.readthedocs.io/en/stable/api/logger.html#message
# One can also pass a dict mapping module names to minimum required level. In such case, each log record will search for it’s closest parent in the dict
# and use the associated level as the filter.
# In order to set a default level, the "" module name should be used as it is the parent of all modules (it does not suppress global level threshold, though).
handler["filter"][""] = False
else:
handler["filter"] = make_filter(name)
Expand Down

0 comments on commit 596611f

Please sign in to comment.