Skip to content

Commit

Permalink
Merge pull request #526 from cailloumajor/renovate/clap-verbosity-fla…
Browse files Browse the repository at this point in the history
…g-3.x

fix(deps): update rust crate clap-verbosity-flag to v3
  • Loading branch information
cailloumajor authored Dec 28, 2024
2 parents 38459bd + d04284a commit 4d836df
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 34 deletions.
5 changes: 3 additions & 2 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 @@ -8,7 +8,7 @@ edition = "2021"

[dependencies]
anyhow = "1.0"
clap-verbosity-flag = "2.0"
clap-verbosity-flag = { version = "3.0", features = [ "tracing" ] }
env_logger = { version = "0.11", default-features = false }
futures-util = "0.3"
mongodb = "2.7"
Expand Down
27 changes: 0 additions & 27 deletions src/level_filter.rs

This file was deleted.

5 changes: 1 addition & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ use tracing_log::format_trace;
use url::Url;

mod db;
mod level_filter;
mod opcua;

use level_filter::VerbosityLevelFilter;

#[derive(Parser)]
struct Args {
#[command(flatten)]
Expand Down Expand Up @@ -50,7 +47,7 @@ fn main() -> anyhow::Result<()> {
let args = Args::parse();

tracing_subscriber::fmt()
.with_max_level(VerbosityLevelFilter::from(&args.verbose))
.with_max_level(args.verbose.tracing_level())
.init();
env_logger::Builder::from_env(Env::default().default_filter_or("info,opcua=warn"))
.format(|_, record| format_trace(record))
Expand Down

0 comments on commit 4d836df

Please sign in to comment.