Skip to content

Commit

Permalink
feat: silence traces from unwanted modules
Browse files Browse the repository at this point in the history
Follows same pattern as control-plane.

Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro committed Oct 27, 2023
1 parent 478d31b commit e071d54
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 8 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions io-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ sysfs = { path = "../sysfs" }
version-info = { path = "../utils/dependencies/version-info" }
events-api = { path = "../utils/dependencies/apis/events" }
event-publisher = { path = "../utils/dependencies/event-publisher" }
tracing-filter = { path = "../utils/dependencies/tracing-filter" }

[dependencies.serde]
features = ["derive"]
Expand Down
6 changes: 1 addition & 5 deletions io-engine/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use tracing_subscriber::{
},
layer::{Layer, SubscriberExt},
registry::LookupSpan,
EnvFilter,
Registry,
};

Expand Down Expand Up @@ -451,10 +450,7 @@ pub fn init_ex(level: &str, format: LogFormat, events_url: Option<url::Url>) {
metadata.target() != EVENTING_TARGET
}));

let filter = match EnvFilter::try_from_default_env() {
Ok(filter) => filter,
Err(_) => tracing_subscriber::EnvFilter::new(level),
};
let filter = tracing_filter::rust_log_filter_ext(level);

// Get the optional eventing layer.
let events_layer = match events_url {
Expand Down

0 comments on commit e071d54

Please sign in to comment.