From b42fc3d57b03dec8974c01b0223a85fc6f8fb204 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 20 Sep 2024 13:29:29 -0700 Subject: [PATCH] Add tracing subscriber (#135) --- crates/lair_keystore/src/bin/lair-keystore-bin/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/lair_keystore/src/bin/lair-keystore-bin/main.rs b/crates/lair_keystore/src/bin/lair-keystore-bin/main.rs index d0a0fe8..2589789 100644 --- a/crates/lair_keystore/src/bin/lair-keystore-bin/main.rs +++ b/crates/lair_keystore/src/bin/lair-keystore-bin/main.rs @@ -192,6 +192,16 @@ async fn get_config( } async fn exec() -> LairResult<()> { + tracing::subscriber::set_global_default( + tracing_subscriber::FmtSubscriber::builder() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .compact() + .finish(), + ) + .unwrap(); + + tracing::info!("starting lair-keystore"); + let opt = Opt::from_args(); let Opt { lair_root, cmd } = opt; let lair_root = dunce::canonicalize(&lair_root)?;