From 06a7aea979376ef8b0f436240bdb3b97e9e47f5e Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Sun, 30 Aug 2020 16:32:09 +0200 Subject: [PATCH] Change some output generating lines --- sfsmcd/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sfsmcd/src/main.rs b/sfsmcd/src/main.rs index 697ad28..542f702 100644 --- a/sfsmcd/src/main.rs +++ b/sfsmcd/src/main.rs @@ -16,6 +16,8 @@ async fn main() -> Result<(), Box> { } env_logger::init(); + debug!("PID: {}, User: {}", std::process::id(), std::env::var("USER").unwrap_or("N/A".into())); + // New Crossroads instance let mut cr = Crossroads::new(); @@ -37,10 +39,10 @@ async fn main() -> Result<(), Box> { // Aquire name on D-Bus match c.request_name(DBUS_NAME, false, true, false).await { - Ok(_) => debug!("D-Bus name: {}", DBUS_NAME), + Ok(_) => info!("Listening (D-Bus) on {}", DBUS_NAME), Err(err) => { error!("Couldn't request name on D-Bus: {}", err); - return Err(err.into()); + std::process::exit(1); } }; @@ -51,7 +53,7 @@ async fn main() -> Result<(), Box> { true })); - // Will (afaik) be stabilized in Rust 1.46 + // Will (afaik) be stabilized in Rust 1.48 // core::future::pending::<()>().await; loop {}; unreachable!();