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

TermLogger uses hard-coded colors #68

Closed
JarrettBillingsley opened this issue Dec 9, 2020 · 2 comments
Closed

TermLogger uses hard-coded colors #68

JarrettBillingsley opened this issue Dec 9, 2020 · 2 comments

Comments

@JarrettBillingsley
Copy link
Contributor

JarrettBillingsley commented Dec 9, 2020

I was hoping they were configurable, but:

let color = match record.level() {
Level::Error => Color::Red,
Level::Warn => Color::Yellow,
Level::Info => Color::Blue,
Level::Debug => Color::Cyan,
Level::Trace => Color::White,
};

I don't think this would be hard to add, so if you like the idea, I could make a pull request.

@Drakulix
Copy link
Owner

Drakulix commented Dec 9, 2020

Yes, this could definitely be an option for simplelog's ConfigBuilder.

Just make sure to keep the current settings as defaults, when you make a PR.
Also please add a re-export for termcolor::Color, so that users do not need to add the dependency themselves.

@JarrettBillingsley
Copy link
Contributor Author

/pull/69 :)

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

No branches or pull requests

2 participants