Skip to content

Commit

Permalink
feat(inoculate): parse log filter in clap (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Apr 9, 2023
1 parent 8cb9851 commit 16f6e7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inoculate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ license = "MIT"
[dependencies]
clap = { version = "4.1.8", features = ["derive", "env"] }
tracing = "0.1.23"
tracing-subscriber = { version = "0.3.1", features = ["env-filter"] }
tracing-subscriber = "0.3.16"
tracing-error = "0.2"
color-eyre = "0.6"
bootloader = "0.11.2"
Expand Down
2 changes: 1 addition & 1 deletion inoculate/src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct OutputOptions {
global = true,
group = ARG_GROUP,
)]
pub log: String,
pub log: tracing_subscriber::filter::Targets,
}

#[derive(Copy, Clone, Debug, Eq, PartialEq, clap::ValueEnum)]
Expand Down
2 changes: 1 addition & 1 deletion inoculate/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl OutputOptions {
tracing_subscriber::registry()
.with(fmt)
.with(tracing_error::ErrorLayer::default())
.with(self.log.parse::<tracing_subscriber::EnvFilter>()?)
.with(self.log.clone())
.try_init()?;
Ok(())
}
Expand Down

0 comments on commit 16f6e7a

Please sign in to comment.