Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tracing-log = { version = "0.2", default-features = false, optional = true }
[dev-dependencies]
thiserror = "1"
anyhow = "1"
structopt = "0.3"
clap = { version = "4", features = ["derive"] }
tracing = { version = "0.1" }
tokio = { version = "1.21", features = ["full"] }

Expand Down
10 changes: 5 additions & 5 deletions examples/yak-shave.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use structopt::StructOpt;
use clap::Parser;
use thiserror::Error;
use tracing::{debug, error, info, span, trace, warn, Level};
use tracing_glog::{Glog, GlogFields};
Expand All @@ -13,19 +13,19 @@ use tracing_glog::{Glog, GlogFields};
/// cargo run --example yak-shave
/// ```

#[derive(Debug, structopt::StructOpt)]
#[derive(Debug, Parser)]
struct Args {
/// Whether to run this example with or without ANSI colors.
#[structopt(long)]
#[clap(long)]
with_ansi: bool,

/// Whether tracing-glog should include the span context.
#[structopt(long)]
#[clap(long)]
with_span_context: bool,
}

fn main() {
let args = Args::from_args();
let args = Args::parse();

tracing_subscriber::fmt()
.with_ansi(args.with_ansi)
Expand Down
Loading