From 4bd0de2e8d2df72183cac7fc1bc6262a1ed9a260 Mon Sep 17 00:00:00 2001 From: Alex Wright Date: Sun, 23 Feb 2020 20:04:07 +0100 Subject: [PATCH] Add logging lib --- Cargo.toml | 2 ++ src/main.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5dd188b..076d38b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,3 +18,5 @@ biscuit = "0.3.1" ring = "0.16.5" num = "0.2" openssl = "0.10.28" +env_logger = "0.7.1" +log = "0.4.8" diff --git a/src/main.rs b/src/main.rs index d8f8413..781bfe8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,9 @@ extern crate hyper; extern crate ldap3; extern crate tokio; +#[macro_use] extern crate log; +use log::Level; + #[macro_use] extern crate serde_derive; @@ -244,6 +247,8 @@ fn router_service() -> Result { } fn main() { + env_logger::init(); + let addr_str = match env::var("LISTEN_ADDR") { Ok(addr) => addr, _ => "0.0.0.0:3000".to_string(),