mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-24 17:56:29 +00:00
Log Address information in connection create/drop (#154)
* Log Address information in connection create/drop * run ci
This commit is contained in:
committed by
GitHub
parent
65b69b46d2
commit
36339bd96f
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user