mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-28 03:06: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.
|
/// Attempts to create a new connection.
|
||||||
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
|
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
|
||||||
info!(
|
info!("Creating a new server connection {:?}", self.address);
|
||||||
"Creating a new connection to {:?} using user {:?}",
|
|
||||||
self.address.name(),
|
|
||||||
self.user.username
|
|
||||||
);
|
|
||||||
|
|
||||||
// Put a temporary process_id into the stats
|
// Put a temporary process_id into the stats
|
||||||
// for server login.
|
// for server login.
|
||||||
|
|||||||
@@ -607,7 +607,8 @@ impl Drop for Server {
|
|||||||
let duration = now - self.connected_at;
|
let duration = now - self.connected_at;
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
"Server connection closed, session duration: {}",
|
"Server connection closed {:?}, session duration: {}",
|
||||||
|
self.address,
|
||||||
crate::format_duration(&duration)
|
crate::format_duration(&duration)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user