Skip to content

Commit

Permalink
fix(log): enable ansi color only in terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Aug 14, 2023
1 parent 18f2b46 commit c07043b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/xtask-bump-check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fn setup_logger() {
let env = tracing_subscriber::EnvFilter::from_env("CARGO_LOG");

tracing_subscriber::fmt()
.with_ansi(std::io::IsTerminal::is_terminal(&std::io::stderr()))
.with_writer(std::io::stderr)
.with_env_filter(env)
.init();
Expand Down
1 change: 1 addition & 0 deletions src/bin/cargo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn setup_logger() {
let env = tracing_subscriber::EnvFilter::from_env("CARGO_LOG");

tracing_subscriber::fmt()
.with_ansi(std::io::IsTerminal::is_terminal(&std::io::stderr()))
.with_writer(std::io::stderr)
.with_env_filter(env)
.init();
Expand Down

0 comments on commit c07043b

Please sign in to comment.