From 3848ca8d698693eedbcc7c039c8d15dafc09d047 Mon Sep 17 00:00:00 2001 From: Stuart Stock Date: Sun, 27 Sep 2020 20:31:34 -0500 Subject: Eliminate use of deprecated simple_logger methods --- src/bin/roughenough-kms.rs | 6 +++--- src/bin/roughenough-server.rs | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/bin/roughenough-kms.rs b/src/bin/roughenough-kms.rs index f7b012e..fecfdde 100644 --- a/src/bin/roughenough-kms.rs +++ b/src/bin/roughenough-kms.rs @@ -25,6 +25,8 @@ use clap::{App, Arg}; #[allow(unused_imports)] use roughenough::kms::{EnvelopeEncryption, KmsProvider}; use roughenough::roughenough_version; +use simple_logger::SimpleLogger; +use log::LevelFilter; #[cfg(not(any(feature = "awskms", feature = "gcpkms")))] fn encrypt_seed(_: &str, _: &str) { @@ -88,9 +90,7 @@ fn get_kms(kms_key: &str) -> impl KmsProvider { #[allow(unused_variables)] pub fn main() { - use log::Level; - - simple_logger::init_with_level(Level::Info).unwrap(); + SimpleLogger::new().with_level(LevelFilter::Info).init().unwrap(); let matches = App::new("roughenough-kms") .version(roughenough_version().as_ref()) diff --git a/src/bin/roughenough-server.rs b/src/bin/roughenough-server.rs index 46fd7b4..4a3096c 100644 --- a/src/bin/roughenough-server.rs +++ b/src/bin/roughenough-server.rs @@ -86,9 +86,7 @@ fn display_config(server: &Server, cfg: &dyn ServerConfig) { } pub fn main() { - use log::Level; - - simple_logger::init_with_level(Level::Info).unwrap(); + SimpleLogger::new().with_level(LevelFilter::Info).init().unwrap(); info!("Roughenough server v{} starting", roughenough_version()); -- cgit v1.2.3