summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-04 12:51:32 -0600
committermo khan <mo@mokhan.ca>2025-07-04 12:51:32 -0600
commit6b8c59801ea745130ad33b09df758646fbbff3da (patch)
tree407e8d5dc24e18d22e7956f7a9a4e7bca74c6a47
parent093c2a626b41f920e6c9fa8efbc6e497761cba10 (diff)
chore: configure tracing
-rw-r--r--src/main.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index fb191ac4..511d3d04 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,12 +1,22 @@
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
- tracing_subscriber::fmt().json().init();
+ tracing_subscriber::fmt()
+ .json()
+ .with_max_level(tracing::Level::INFO)
+ .with_current_span(true)
+ .with_span_list(true)
+ .with_target(true)
+ .with_thread_ids(true)
+ .with_thread_names(true)
+ .with_file(true)
+ .with_line_number(true)
+ .init();
let addr = std::env::var("BIND_ADDR")
.unwrap_or_else(|_| "127.0.0.1:50051".to_string())
.parse()?;
- log::info!("Listening on... {addr}");
+ tracing::info!(address = %addr, "Starting authorization server");
let server = authzd::authorization::Server::new()?;
server.serve(addr).await?;