zerolog icon indicating copy to clipboard operation
zerolog copied to clipboard

Customize colors per log level

Open yoav85 opened this issue 4 years ago • 1 comments

Maybe it's possible with custom formatting, but not sure how to achieve that. For example, I'd like to change the colors that render for each log level in the debug console, perhaps even apply that color to the whole line (not just the word which indicates the log level). Thanks

yoav85 avatar May 19 '21 10:05 yoav85

ideally the FormatMessage function the log level in its signature. something like this would allow setting color for the message to match the level.:

func(i interface{}, level zerolog.Level) string {
....
}

coderigo avatar Aug 29 '23 23:08 coderigo