Skip to content

Commit

Permalink
brought back trace levels
Browse files Browse the repository at this point in the history
  • Loading branch information
amitu committed Feb 16, 2024
1 parent 47b29ea commit 5f64c7b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 39 deletions.
66 changes: 33 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
[dependencies]
tracing = "0.1"
tracing-subscriber = "0.3"
tokio = { version = "1.27.0", features = ["full"] }
tokio = { version = "1", features = ["full"] }
smallvec = "1"
ansi_term = "0.12"
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ pub use tree::{Event, Shared, Span, Tree};
pub fn observe() {
use tracing_subscriber::layer::SubscriberExt;

// let level = std::env::var("TRACING")
// .unwrap_or_else(|_| "info".to_string())
// .parse::<tracing_forest::util::LevelFilter>()
// .unwrap_or(tracing_forest::util::LevelFilter::INFO);
let level = std::env::var("TRACING")
.unwrap_or_else(|_| "info".to_string())
.parse::<tracing_subscriber::filter::LevelFilter>()
.unwrap_or(tracing_subscriber::filter::LevelFilter::INFO);

let s = tracing_subscriber::registry()
//.with(level)
.with(level)
.with(Layer::default());
tracing::subscriber::set_global_default(s).unwrap();
}
Expand Down

0 comments on commit 5f64c7b

Please sign in to comment.