hyper-server: Initial version
[learn-rust.git] / serde / src / main.rs
index fc88d23c418c5872db2d7df475506038a1644949..cdc7c81259b5aa4b177fbf2cb8197d7b78b30fc6 100644 (file)
@@ -44,9 +44,9 @@ fn load_contacts() -> Result<Contacts, Box<dyn Error>> {
 }
 
 fn main() -> Result<(), Box<dyn Error>> {
-    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(())
 }