aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 5 insertions, 3 deletions
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;
}