Open steph-lion opened 1 year ago
👋 we don't currently support this with the default colorization. The default colorizer colors messages by:
I also don't think it's currently possible to achieve the desired result by providing a custom colorizer function (when using this module programattically) as the internal API is colorizer.message(str)
without any parameters to base color choosing on.
This could be an interesting feature to add, though. Would you like to work on it?
customColors: {
default: "white",
60: "bgRed",
50: "red",
40: "yellow",
30: "green",
20: "blue",
10: "gray",
message: "reset",
greyMessage: "gray",
}
Note: If you do not provide values for the default levels, they will be overridden, so you have to explicitely include them (which seems like a bug to me). Use "reset" for default terminal color.
Will look sth like this:
I have tried all kind of logs this library offers (info, debug, error etc..), but every output has a cyan color as the picture below
I would like to change and set a custom color for each log. For example, the trace log should have the same color as
TRACE
itself.Here is my configuration: