diff --git a/Cargo.toml b/Cargo.toml index ab90fa4..c7a725a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,3 +13,5 @@ dbus-tokio = "0.7.5" tokio = { version = "1.19.2", features = [ "time", "macros", "rt-multi-thread" ] } futures = "0.3" futures-util = "0.3" +log = "0.4" +env_logger = "0.8" diff --git a/src/main.rs b/src/main.rs index 338ae8e..dda0f77 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,6 +23,8 @@ use std::fmt; use std::sync::Arc; use futures_util::stream::StreamExt; +use env_logger; + use tokio::{ task::JoinHandle, time::Duration, @@ -193,6 +195,8 @@ async fn print_foo(mm: ModemManager) -> Result<(), Error> { #[tokio::main] pub async fn main() -> Result<(), Box> { + env_logger::init(); + let dbus = DBus::connect()?; let mut interval = tokio::time::interval(Duration::from_secs(2));