Skip to content

Commit

Permalink
Merge pull request #2068 from subspace/farmer-no-color-on-windows
Browse files Browse the repository at this point in the history
No colors in farmer logs on Windows
  • Loading branch information
nazar-pc authored Oct 6, 2023
2 parents 8c97d86 + 2530931 commit ca754e7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/subspace-farmer/src/bin/subspace-farmer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,13 @@ async fn main() -> anyhow::Result<()> {
tracing_subscriber::registry()
.with(
fmt::layer()
// TODO: Workaround for https://github.com/tokio-rs/tracing/issues/2214
.with_ansi(supports_color::on(supports_color::Stream::Stderr).is_some())
// TODO: Workaround for https://github.com/tokio-rs/tracing/issues/2214, also on
// Windows terminal doesn't support the same colors as bash does
.with_ansi(if cfg!(windows) {
false
} else {
supports_color::on(supports_color::Stream::Stderr).is_some()
})
.with_filter(
EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
Expand Down

0 comments on commit ca754e7

Please sign in to comment.