From 36339bd96f590b660023ba8ac96c411c357b82a7 Mon Sep 17 00:00:00 2001 From: Mostafa Abdelraouf Date: Thu, 1 Sep 2022 13:16:22 -0500 Subject: [PATCH] Log Address information in connection create/drop (#154) * Log Address information in connection create/drop * run ci --- src/pool.rs | 6 +----- src/server.rs | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pool.rs b/src/pool.rs index 99cccaf..dea29ad 100644 --- a/src/pool.rs +++ b/src/pool.rs @@ -559,11 +559,7 @@ impl ManageConnection for ServerPool { /// Attempts to create a new connection. async fn connect(&self) -> Result { - info!( - "Creating a new connection to {:?} using user {:?}", - self.address.name(), - self.user.username - ); + info!("Creating a new server connection {:?}", self.address); // Put a temporary process_id into the stats // for server login. diff --git a/src/server.rs b/src/server.rs index 3134a65..65ca6c6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -607,7 +607,8 @@ impl Drop for Server { let duration = now - self.connected_at; info!( - "Server connection closed, session duration: {}", + "Server connection closed {:?}, session duration: {}", + self.address, crate::format_duration(&duration) ); }