pub trait ErrorLog {
type ConnectionError;
type SinkError;
// Provided methods
fn connection_error(&self, _addr: SocketAddr, _e: Self::ConnectionError) { ... }
fn sink_error(&self, _addr: SocketAddr, _e: Self::SinkError) { ... }
fn pool_shutting_down(&self, _reason: ShutdownReason) { ... }
fn pool_closed(&self) { ... }
}Expand description
The thrait that has appropriate hooks for logging different events
There is a default WarnLogger, but the idea is that you may give
connection pool a name, change logging levels, and do other interesting
stuff in your own error log handler.
Required Associated Types§
Sourcetype ConnectionError
type ConnectionError
Connection error type that is returned by connect/hanshake function
Provided Methods§
Sourcefn connection_error(&self, _addr: SocketAddr, _e: Self::ConnectionError)
fn connection_error(&self, _addr: SocketAddr, _e: Self::ConnectionError)
Error when establishing a new connection
Sourcefn sink_error(&self, _addr: SocketAddr, _e: Self::SinkError)
fn sink_error(&self, _addr: SocketAddr, _e: Self::SinkError)
Error when sending a request
This also means connection is closed
Sourcefn pool_shutting_down(&self, _reason: ShutdownReason)
fn pool_shutting_down(&self, _reason: ShutdownReason)
Pool is started to shut down for the specified reason
Sourcefn pool_closed(&self)
fn pool_closed(&self)
Pool is fully closed at this moment