summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-25 19:43:41 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-25 19:44:47 -0700
commit0e1d7e4758cbff5f92b17ff93e67b76478cb8bd5 (patch)
treec7d94e30b78ae4d180bdc2aa970ec5d05180e662 /src
parentf751458d218eb1bbf16d78b3b5ce26809f4984b5 (diff)
downloades-public-proxy-0e1d7e4758cbff5f92b17ff93e67b76478cb8bd5.tar.gz
es-public-proxy-0e1d7e4758cbff5f92b17ff93e67b76478cb8bd5.zip
make default log-level 'info'
Diffstat (limited to 'src')
-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;
}