forked from Deuxfleurs/tricot
Different logging
This commit is contained in:
parent
25ddb1b23e
commit
7dbf848de3
1 changed files with 5 additions and 1 deletions
|
@ -116,7 +116,10 @@ async fn handle(
|
||||||
proxy_to.calls.fetch_add(1, Ordering::SeqCst);
|
proxy_to.calls.fetch_add(1, Ordering::SeqCst);
|
||||||
|
|
||||||
let to_addr = format!("http://{}", proxy_to.target_addr);
|
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);
|
trace!("Request: {:?}", req);
|
||||||
|
|
||||||
let mut response = reverse_proxy::call(remote_addr.ip(), &to_addr, req).await?;
|
let mut response = reverse_proxy::call(remote_addr.ip(), &to_addr, req).await?;
|
||||||
|
@ -128,6 +131,7 @@ async fn handle(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
trace!("Response: {:?}", response);
|
trace!("Response: {:?}", response);
|
||||||
|
info!("{} {} {}", method, response.status().as_u16(), uri);
|
||||||
|
|
||||||
Ok(response)
|
Ok(response)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue