Log Address information in connection create/drop (#154)

* Log Address information in connection create/drop

* run ci
This commit is contained in:
Mostafa Abdelraouf
2022-09-01 13:16:22 -05:00
committed by GitHub
parent 65b69b46d2
commit 36339bd96f
2 changed files with 3 additions and 6 deletions

View File

@@ -559,11 +559,7 @@ impl ManageConnection for ServerPool {
/// Attempts to create a new connection.
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
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.

View File

@@ -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)
);
}