mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Including tracing setup in all examples (#79)
This commit is contained in:
@@ -18,6 +18,8 @@ use uuid::Uuid;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
// Inject a `UserRepo` into our handlers via a trait object. This could be
|
||||
// the live implementation or just a mock for testing.
|
||||
let user_repo = Arc::new(ExampleUserRepo) as DynUserRepo;
|
||||
|
||||
Reference in New Issue
Block a user