From 7156719f302e19696a04e7e4df5625342fc086c6 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 25 Feb 2025 14:50:04 +0100 Subject: [PATCH] Update --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6db70b8..75f5173 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,6 +62,8 @@ async fn main() -> Result<(), Box> { let (mut client_socket, _) = listener.accept().await?; tokio::spawn(async move { + log::info!("Start new mission from {}", client_socket.peer_addr().unwrap()); + let args = Args::parse(); let base_file_name = format!( @@ -114,7 +116,7 @@ async fn main() -> Result<(), Box> { log::error!("Failed to read data from client, closing connection! {e}"); return; }}; - log::info!("Got a new client read {count}"); + log::info!("Got a new client read {count} - {base_file_name}"); if count == 0 { log::warn!("infinite loop (client)"); @@ -152,7 +154,7 @@ async fn main() -> Result<(), Box> { return; } - log::info!("Got a new upstream read {count}"); + log::info!("Got a new upstream read {count} - {base_file_name}"); client_write.write_all(&buf_server[..count]).await.expect("Failed to write to client"); res_file.write_all(&buf_server[..count]).expect("Failed to write to res"); }