From 9eccf490184a806bee893a44deac2ef40f72dc1e Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Fri, 8 Nov 2024 22:23:29 +0900 Subject: [PATCH] feat: add log --- Cargo.lock | 12 ++++++++++++ lala_bar/Cargo.toml | 1 + lala_bar/src/main.rs | 3 +-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 828f3a5..9e45ebc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2359,6 +2359,7 @@ dependencies = [ "serde", "tokio", "tracing", + "tracing-journald", "tracing-subscriber", "url", "xdg", @@ -4147,6 +4148,17 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-journald" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba316a74e8fc3c3896a850dba2375928a9fa171b085ecddfc7c054d39970f3fd" +dependencies = [ + "libc", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-log" version = "0.2.0" diff --git a/lala_bar/Cargo.toml b/lala_bar/Cargo.toml index 568c4d9..e7add65 100644 --- a/lala_bar/Cargo.toml +++ b/lala_bar/Cargo.toml @@ -43,3 +43,4 @@ futures.workspace = true iced_zbus_notification.workspace = true chrono = "0.4.38" async-trait.workspace = true +tracing-journald = "0.3.0" diff --git a/lala_bar/src/main.rs b/lala_bar/src/main.rs index 9724c79..357a6cc 100644 --- a/lala_bar/src/main.rs +++ b/lala_bar/src/main.rs @@ -65,8 +65,7 @@ static PAUSE_HANDLE: LazyLock = LazyLock::new(|| svg::Handle::from_ const MAX_SHOWN_NOTIFICATIONS_COUNT: usize = 4; pub fn main() -> Result<(), iced_layershell::Error> { - env_logger::builder().format_timestamp(None).init(); - + tracing_subscriber::fmt().init(); LalaMusicBar::run(Settings { layer_settings: LayerShellSettings { size: Some((0, 35)),