From 0e1d7e4758cbff5f92b17ff93e67b76478cb8bd5 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 25 Aug 2020 19:43:41 -0700 Subject: make default log-level 'info' --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 342836f..90161ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,7 @@ async fn run_server(config: ProxyConfig) { Some(addr) => addr.parse().unwrap(), }; - info!("Listening on http://{}", addr); + warn!("Listening on http://{}", addr); // TODO: possible to avoid cloning config on every connection? let make_svc = make_service_fn(move |_| { @@ -78,7 +78,7 @@ fn load_config() -> ProxyConfig { [_, "--example-config"] => { println!("{}", include_str!("../example_config.toml")); std::process::exit(0); - }, + } [_, "--config", p] => config_path = Some(p.to_string()), [_, "--allow-all-indices"] => allow_all_indices = true, _ => { @@ -110,6 +110,8 @@ fn load_config() -> ProxyConfig { #[tokio::main] async fn main() { let config = load_config(); - env_logger::init(); + env_logger::init_from_env( + env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), + ); run_server(config).await; } -- cgit v1.2.3