WIP: Add configurable logger feature#467
Conversation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
Thanks for the PR! I'm not 100% sure yet where I want to go with the logger - it started as an experiment to have some debugging, but then cursive-flexi-logger-view appeared, and is probably better in every way. The question is then: what is worth maintaining in cursive itself. I don't think there are many things that can only be done in cursive, so whatever we have here will just be one competitor among others (much like the built-in views). Our options are roughly:
I'm actually considering all 3 options. One problem with the option 2 is that I don't know exactly what qualifies as "good-enough". (Note that being able to select the log level should definitely be part of the minimal implementation, so this at least should most likely be merged.) For now I think I'll aim to stay with option 1, the minimal implementation. This would include selecting the desired log level, but probably not complex templating. In this case we'll want to always enable log level selection, no need for feature flag. |
|
I like Option 2 quite well. I worked previously with pythons |
|
Is there any update on this? Is using cursive-flexi-logger-view the current recommended approach |
Hi,
I am currently playing with cursive and had the problem that I cannot configure the logger, so I had a look at the codebase and found that there is just no configurable logger yet.
So this is my proposal (I am planning to implement more features for the logger, most notably handlebars-based templating if you don't mind).
If you approve, we can discuss how to continue on this idea.
I made it available under a feature flag because more features might pull in quite a lot of dependencies (handlebars for example), so I figured that might be a good way.
Of course, this is WIP and not final.