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

Add color support to env_logger #37

lfairy opened this Issue Apr 14, 2015 · 4 comments


None yet
5 participants

lfairy commented Apr 14, 2015

On Unix, we can use the ansi_term crate or roll our own. I'm not sure how it works on Windows; we can just skip colors there for now.

As for configuration: we can add a new environment variable RUST_LOG_COLOR. It will take the values never, always, or auto (default). If auto, the logger will use color only when stderr is connected to a terminal.


This comment has been minimized.

FredrikNoren commented Nov 29, 2015



This comment has been minimized.

calebmer commented Mar 22, 2016

Color support along the lines of ansi_term would be very nice.


This comment has been minimized.

antoyo commented May 9, 2017

The pretty_env_logger crate supports this.


This comment has been minimized.


KodrAus commented Sep 24, 2017

We've got sebasmagri/env_logger#2 in env_loggers new home to discuss this so I'll go ahead and close this one now.

@KodrAus KodrAus closed this Sep 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment