From: Martin Pitt Date: Sun, 26 Sep 2021 08:47:26 +0000 (+0200) Subject: serde: Show ≥ info logs by default X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=1937a8d2b7c38d7ed44d6e5077e31833ca0903c4;p=learn-rust.git serde: Show ≥ info logs by default --- diff --git a/serde/src/main.rs b/serde/src/main.rs index fc88d23..cdc7c81 100644 --- a/serde/src/main.rs +++ b/serde/src/main.rs @@ -44,9 +44,9 @@ fn load_contacts() -> Result> { } fn main() -> Result<(), Box> { - env_logger::init(); + env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); create_contacts()?; let contacts = load_contacts()?; - println!("deserialized: {:?}", &contacts); + log::info!("deserialized: {:?}", &contacts); Ok(()) }