From 7dbf848de3137158d1e12c2cd547ab4778fcf5a0 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 8 Dec 2021 22:24:58 +0100 Subject: Different logging --- src/https.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/https.rs b/src/https.rs index 33b8030..7d64e44 100644 --- a/src/https.rs +++ b/src/https.rs @@ -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 { -- cgit v1.2.3