Skip to content

Commit

Permalink
LEA -> Filter TRACE logs from other crates.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfm committed Jan 28, 2025
1 parent 2cc2f7d commit 3c9228e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opendut-lea/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ slotmap = { workspace = true }
strum = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["ansi"] }
tracing-subscriber = { workspace = true, features = ["ansi", "tracing-log"] }
tracing-web = { workspace = true }
url = { workspace = true }
uuid = { workspace = true }
Expand Down
9 changes: 8 additions & 1 deletion opendut-lea/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use leptos::prelude::*;
use tracing::info;
use tracing_subscriber::fmt::format::Pretty;
use tracing_subscriber::{filter, Layer};
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;

Expand Down Expand Up @@ -31,7 +32,13 @@ fn main() {
.with_ansi(false)
.without_time()
.with_writer(tracing_web::MakeConsoleWriter)
.pretty();
.pretty()
.with_filter(
filter::Targets::default()
.with_default(tracing::Level::DEBUG)
.with_target("opendut", tracing::Level::TRACE)
);

let perf_layer = tracing_web::performance_layer()
.with_details_from_fields(Pretty::default());

Expand Down

0 comments on commit 3c9228e

Please sign in to comment.