Skip to content

Commit

Permalink
feat(examples): enable tracing on embed
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Dec 3, 2023
1 parent 2a7836e commit 1a417dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/static-files/embed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ publish = false
[dependencies]
viz = { workspace = true, features = ["embed"] }

hyper = { workspace = true, features = ["tracing"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
rust-embed.workspace = true

tracing.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter"] }
2 changes: 2 additions & 0 deletions examples/static-files/embed/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ struct Asset;

#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt::init();

let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
let listener = TcpListener::bind(addr).await?;
println!("listening on http://{addr}");
Expand Down

0 comments on commit 1a417dd

Please sign in to comment.