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(),