diff options
author | Joris | 2020-10-18 12:09:48 +0200 |
---|---|---|
committer | Joris | 2020-10-18 12:09:48 +0200 |
commit | d56cfb9377729057d0d599d7a998b9b27c12049e (patch) | |
tree | 4df0f2ea441c2afc8ff3727fed9f09fa779369cf /src | |
parent | 84e5a1f91517565f9da6078527fec00f753ab379 (diff) |
Trim down logs
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs index ccfb81e..43de71b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -85,10 +85,10 @@ async fn proxy( let unauthorized_hosts = currently_unauthorized_hosts(config); if block_uri(&unauthorized_hosts, uri) { - info!("Blocked: {:?}", uri); + debug!("Blocked: {:?}", uri); Ok(Response::new(Body::empty())) } else { - info!("Authorized: {:?}", uri); + debug!("Authorized: {:?}", uri); if req.method() == Method::CONNECT { if let Some(addr) = host_addr(uri) { @@ -146,7 +146,7 @@ async fn tunnel(upgraded: Upgraded, addr: &str) -> std::io::Result<()> { ); } Err(e) => { - warn!("tunnel error: {}", e); + debug!("tunnel error: {}", e); } }; Ok(()) @@ -211,13 +211,15 @@ fn parse_days(str: &str) -> Vec<i32> { let xs = str.split("-").collect::<Vec<&str>>(); let from = parse_day(xs[0]); let to = parse_day(xs[1]); - (1..8).filter(|d| { - if from < to { - d >= &from && d <= &to - } else { - d >= &from || d <= &to - } - }).collect() + (1..8) + .filter(|d| { + if from < to { + d >= &from && d <= &to + } else { + d >= &from || d <= &to + } + }) + .collect() } fn parse_day(str: &str) -> i32 { |