Add log/env_logger crate

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-07-24 18:44:21 +02:00
parent c9e926b3ec
commit 80b8efce6f
Signed by: pep
GPG Key ID: DEDA74AEECA9D0F2
2 changed files with 6 additions and 0 deletions

View File

@ -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"

View File

@ -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<dyn std::error::Error>> {
env_logger::init();
let dbus = DBus::connect()?;
let mut interval = tokio::time::interval(Duration::from_secs(2));