diff --git a/Cargo.toml b/Cargo.toml index 05673af..25cef14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,5 +20,5 @@ clap = { version = "4.4", features = ["derive"] } log = "0.4" [target.'cfg(target_os = "linux")'.dependencies] -systemd-journal-logger = "1.0" +systemd-journal-logger = { version = "1.0", features = ["systemd"] } diff --git a/src/main.rs b/src/main.rs index f588001..652e1b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,9 +105,7 @@ async fn main() { println!("🚀 Starting TimeTurner daemon..."); #[cfg(target_os = "linux")] { - // Manually initialize the logger as a workaround for build issues. - let logger = systemd_journal_logger::JournalLog::new().unwrap(); - log::set_boxed_logger(Box::new(logger)).unwrap(); + systemd_journal_logger::init().unwrap(); log::set_max_level(log::LevelFilter::Info); log::info!("TimeTurner daemon started. API server is running."); }