summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2020-09-27 20:31:34 -0500
committerStuart Stock <stuart@int08h.com>2020-09-27 20:34:02 -0500
commit3848ca8d698693eedbcc7c039c8d15dafc09d047 (patch)
tree16f3eb6aa5fc4e7265d23e5d112ab1d99781171e
parent334ab6cc9cea5fc99cf92f74f2db118783b31e89 (diff)
downloadroughenough-3848ca8d698693eedbcc7c039c8d15dafc09d047.zip
Eliminate use of deprecated simple_logger methods
-rw-r--r--src/bin/roughenough-kms.rs6
-rw-r--r--src/bin/roughenough-server.rs4
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());