From 2f671f196e245ac1a791c001286e401a2fab9d3a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 20 Jul 2026 23:00:06 +0200 Subject: chore: Commit --- crates/server/Cargo.toml | 1 + crates/server/src/main.rs | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'crates/server') diff --git a/crates/server/Cargo.toml b/crates/server/Cargo.toml index 0afd678b..7343c0fc 100644 --- a/crates/server/Cargo.toml +++ b/crates/server/Cargo.toml @@ -12,6 +12,7 @@ homepage = { workspace = true } repository = { workspace = true } [dependencies] +tracing-subscriber = { version = "0.3", features = ["ansi", "fmt", "registry", "env-filter", "json"] } axum = "0.8" config = { version = "0.15.8", default-features = false, features = ["toml"] } clap = { workspace = true } diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs index fb587754..56c44d2d 100644 --- a/crates/server/src/main.rs +++ b/crates/server/src/main.rs @@ -7,6 +7,7 @@ use database::db::ServerPostgres; use eyre::{Context, Result, eyre}; use tokio::net::TcpListener; use tokio::signal; +use tracing_subscriber::util::SubscriberInitExt; use crate::database::DbType; use crate::settings::Settings; @@ -69,6 +70,10 @@ impl Cmd { #[tokio::main] async fn main() -> Result<()> { + if let Err(e) = tracing_subscriber::registry().try_init() { + eprintln!("failed to initialize logging: {e}"); + } + Cmd::parse().run().await } -- cgit v1.3.1