Different logging

This commit is contained in:
Alex 2021-12-08 22:24:58 +01:00
parent 25ddb1b23e
commit 7dbf848de3
No known key found for this signature in database
GPG Key ID: EDABF9711E244EB1
1 changed files with 5 additions and 1 deletions

View File

@ -116,7 +116,10 @@ async fn handle(
proxy_to.calls.fetch_add(1, Ordering::SeqCst);
let to_addr = format!("http://{}", proxy_to.target_addr);
info!("Proxying {} {} -> {}", host, path, to_addr);
let method = req.method().clone();
let uri = req.uri().to_string();
debug!("{}{} -> {}", host, path, proxy_to);
trace!("Request: {:?}", req);
let mut response = reverse_proxy::call(remote_addr.ip(), &to_addr, req).await?;
@ -128,6 +131,7 @@ async fn handle(
);
}
trace!("Response: {:?}", response);
info!("{} {} {}", method, response.status().as_u16(), uri);
Ok(response)
} else {