Skip to content

Commit 36339bd

Browse files
authored
Log Address information in connection create/drop (#154)
* Log Address information in connection create/drop * run ci
1 parent 65b69b4 commit 36339bd

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/pool.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,7 @@ impl ManageConnection for ServerPool {
559559

560560
/// Attempts to create a new connection.
561561
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
562-
info!(
563-
"Creating a new connection to {:?} using user {:?}",
564-
self.address.name(),
565-
self.user.username
566-
);
562+
info!("Creating a new server connection {:?}", self.address);
567563

568564
// Put a temporary process_id into the stats
569565
// for server login.

src/server.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ impl Drop for Server {
607607
let duration = now - self.connected_at;
608608

609609
info!(
610-
"Server connection closed, session duration: {}",
610+
"Server connection closed {:?}, session duration: {}",
611+
self.address,
611612
crate::format_duration(&duration)
612613
);
613614
}

0 commit comments

Comments
 (0)