Commit c42bd5e
committed
Verbose mode targets desired logging familes
Why these changes are being introduced:
Previously, when --verbose was set for the CLI all loggers inherited this.
In other applications, we have used a 'WARNING_ONLY_LOGGERS' env var that
would limit them to WARNING level. This worked, but was perhaps not ideal.
Without that env var, it's a bit of whack-a-mole to figure out which loggers
to quiet.
How this addresses that need:
Instead of defaulting all loggers to DEBUG in verbose mode, we target only
libraries we expect this application to log in DEBUG. By default, all other
logger families will still have WARNING.
This may be a pattern we want to explore in other repositories. Potentially
even further inverting the pattern and supporting a 'DEBUG_LOGGERS' env var
list that would explicitly toggle on DEBUG logging for those libraries.
That would allow troubleshooting in deployed environments just by setting
an env var.
This is NOT applied in this commit, but noting for future consideration.
Side effects of this change:
* Both 'embeddings' and 'timdex_dataset_api' are logged as DEBUG
in verbose mode, but only those libraries.
Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/USE-1121 parent ce181df commit c42bd5e
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments