Introduce logging modes#6773
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6773 +/- ##
==========================================
+ Coverage 75.17% 75.59% +0.42%
==========================================
Files 163 163
Lines 21228 21299 +71
Branches 3352 3358 +6
==========================================
+ Hits 15958 16101 +143
+ Misses 4496 4407 -89
- Partials 774 791 +17 🚀 New features to boost your workflow:
|
3195bfd to
d20b418
Compare
|
@JOJ0 Would you mind having a look 🙃 |
f6062a8 to
a5d17fc
Compare
and decision making at the moment.
|
Hi @semohr appologies for not responding earlier. I'm already picturing how useful the new default mode will be:
This sounds promising and exactly what I'm often missing in beets. More info, less noise! What I can't grasp is how this would look like from a plugin developer's perspective. Would we still simply write a log line that looks like this: Also I'm wondering if this feature wish could be realised (without using grep): Display regular output of Maybe all dumb questions but some example snippets of how calls would look like and how refactoring of existing log calls could look like (if required). Many thanks for this proposal! |
|
Thanks for having a look! You think anything of the following should go into the docs?
Things should not change from a plugin developer's perspective. You would continue to use the existing logging API, for example: Plugin developers would still only choose the appropriate log level (info, debug, warning, etc.). The new modes do not introduce an additional concept that plugins need to target. Instead, they determine which log messages are shown in the terminal and how they are presented. In other words, the modes are simply an abstraction over the logging configuration.
Yes, that should be possible if we decide to allow custom modes. Personally, my ideal configuration would be to only show
The dump questions are the ones not asked 🙃 Modes can simply be thought of as predefined logging configurations that a user can toggle. The concept does not really propagate into the code beyond the initial logging configuration. From a plugin maintainer's perspective, there should be no refactoring required. |
|
Love the log file idea! I'm missing this since ever! ❤️ |
Description
We’ve made solid progress over the past months on the logging enhancements proposed in #6553. It’s now a good time to align on a clear direction for how logging modes should work going forward.
I’ve put together an initial draft of the updated logging specification in the documentation. @beetbox/maintainers Please take a look and share your ideas/feedback/questions.
Once we’re aligned on the approach, I’ll proceed with the implementation.
This is related to the multi-step efforts to improve logging in beets #6553