From 22a48966935bf9bd15afb736598d4e6d71316d95 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 6 Jul 2022 07:44:04 +0900 Subject: [PATCH] fix log message --- src/proxy/proxy_h3.rs | 4 ++-- src/proxy/proxy_handler.rs | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/proxy/proxy_h3.rs b/src/proxy/proxy_h3.rs index 90a6f8f..d37702f 100644 --- a/src/proxy/proxy_h3.rs +++ b/src/proxy/proxy_h3.rs @@ -41,8 +41,8 @@ where .await .map_err(|e| anyhow!("HTTP/3 accept failed: {}", e))? { - info!( - "HTTP/3 new request received from {}: {}, {}", + debug!( + "HTTP/3 new request from {}: {} {}", client_addr, req.method(), req.uri() diff --git a/src/proxy/proxy_handler.rs b/src/proxy/proxy_handler.rs index cc6dff9..cb3dfbe 100644 --- a/src/proxy/proxy_handler.rs +++ b/src/proxy/proxy_handler.rs @@ -31,7 +31,17 @@ where mut req: Request, client_addr: SocketAddr, // アクセス制御用 ) -> Result> { - debug!("Handling request: {:?}", req); + info!( + "Handling {:?} request from {}: {} {} {:?}", + req.version(), + client_addr, + req.method(), + req.uri(), + req + .headers() + .get("user-agent") + .map_or_else(|| "", |ua| ua.to_str().unwrap()) + ); // Here we start to handle with server_name // Find backend application for given server_name let (server_name, _port) = if let Ok(v) = parse_host_port(&req, self.tls_enabled) {