Request: Support custom log levels
(Potentially I'm just blind and this already exists)
[level_map] in the config is not able to achieve this (if i'm not missing something):
DEV = "BLUE" displays as BLUE
i'd want an option to print the DEV level/severity as DEV but highlighted in blue
if this is available in some of the formatting magic i'd appreciate some guidance, yet still this might be worth considering as part of the config file
at the moment this is not a feature.
This is the relevant handlebar helper: https://github.com/brocode/fblog/blob/3eea0bc843f242ead47489ae89814592272dee0d/src/template.rs#L46
Maybe we need one that takes additional parameters 🤔
Could you provide a few example log lines and a short explanation how they should be rendered?
{"timestamp":"2024-10-11T22:54:43.113Z","level":"ABC","message":"log of the level abc"}
{"timestamp":"2024-10-11T22:54:43.113Z","level":"DEF","message":"log of the level def"}
{"timestamp":"2024-10-11T22:54:43.113Z","level":"DEF","message":"another def log"}
[log_levels]
abc = "cyan"
def = "yellow"
if i understand the readme correctly, currently only these are rendered in distinct colors:
trace
debug
info
warn
error
fatal
and everything else ("XYZ" in the readme example shows that) defaults to magenta? i'd like to customize that color
my real use case is that i have data frames for different packet types i'd like to distinctly color; doing it via the level seems like the more generally useful approach in the context of this project (though i am aware i am somewhat abusing the semantics of "level" to fit that use case)