[unstable] Add log level override #452
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #452 +/- ##
==========================================
+ Coverage 78.02% 78.96% +0.93%
==========================================
Files 42 42
Lines 3627 3636 +9
==========================================
+ Hits 2830 2871 +41
+ Misses 797 765 -32
🚀 New features to boost your workflow:
|
| # Use the override level if provided | ||
| level_to_set = _resolve_log_level(self.log_level_override) | ||
| min_level = level_to_set | ||
| max_level = level_to_set |
There was a problem hiding this comment.
Is min and max level for the log should be same in case log level override? Or is it configurable too?
There was a problem hiding this comment.
I think when we use the --log-level override from the command line, the intended behavior should be to force all log handlers to a single, specific level unlike the config where there can be multiple log-handlers and hence multiple log-levels.
toondaey
left a comment
There was a problem hiding this comment.
Nice work. But I believe there's another _setup_logging in runtime.py that you may need to override.
The My initial thought was to keep them separate to guarantee that critical startup messages are always visible. Let me know if I should adjust if a unified approach is preferred. |
You're right. The ticket does also say just log level in the extractor config. |
|
I just realized that we need an entry in the changelog for this. |
toondaey
left a comment
There was a problem hiding this comment.
Hopefully, no conflicts.
This PR adds support to override the log level defined in the application config from the cli.