Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize colors per log level #320

Open
yoav85 opened this issue May 19, 2021 · 1 comment · May be fixed by #690
Open

Customize colors per log level #320

yoav85 opened this issue May 19, 2021 · 1 comment · May be fixed by #690

Comments

@yoav85
Copy link

yoav85 commented May 19, 2021

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

@coderigo
Copy link

coderigo commented Aug 29, 2023

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 coderigo linked a pull request Oct 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants