Skip to content

Commit

Permalink
Log Address information in connection create/drop (#154)
Browse files Browse the repository at this point in the history
* Log Address information in connection create/drop

* run ci
  • Loading branch information
drdrsh authored Sep 1, 2022
1 parent 65b69b4 commit 36339bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down

0 comments on commit 36339bd

Please sign in to comment.