Trait tk_pool::error_log::ErrorLog [] [src]

pub trait ErrorLog {
    type ConnectionError;
    type SinkError;
    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) { ... } }

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.

Associated Types

Connection error type that is returned by connect/hanshake function

Error when sending request returned by Sink

Provided Methods

Error when establishing a new connection

Error when sending a request

This also means connection is closed

Pool is started to shut down for the specified reason

Pool is fully closed at this moment

Implementors