-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Labels
kind/featureNew feature or requestNew feature or request
Description
What would you like to be added:
Colorize numeric log levels with levelColor
or similar, or at least allow the log to be printed anyway.
E.g. {"level": 30, "msg": "A message"}
Why is this needed:
Some log libraries use numeric log levels instead of the, in my experience, more usual debug, info, warn etc. When using the template function levelColor
on numeric values it throws an error.
expanding template failed: template: log:1:70: executing "log" at <$d.level>: wrong type for value; expected string; got json.Number
It would be nice if levelColor
could colorize numbers too, or at least allow the log line to be printed anyway.
Metadata
Metadata
Assignees
Labels
kind/featureNew feature or requestNew feature or request