Skip to content

Commit

Permalink
Revert "tracing: Disable colored log output on Heroku (#7505)" (#7526)
Browse files Browse the repository at this point in the history
This reverts commit 387f06c.
  • Loading branch information
Turbo87 authored Nov 14, 2023
1 parent e93ef9f commit ad7092e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/util/tracing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crates_io_env_vars::var;
use sentry::integrations::tracing::EventFilter;
use tracing::Level;
use tracing::Metadata;
Expand All @@ -18,15 +17,12 @@ pub fn init() {
}

fn init_with_default_level(level: LevelFilter) {
let is_heroku = matches!(var("HEROKU"), Ok(Some(_)));

let env_filter = EnvFilter::builder()
.with_default_directive(level.into())
.from_env_lossy();

let log_layer = tracing_subscriber::fmt::layer()
.compact()
.with_ansi(!is_heroku)
.without_time()
.with_filter(env_filter);

Expand Down

0 comments on commit ad7092e

Please sign in to comment.