LoggingHandler

Trait LoggingHandler 

Source
pub trait LoggingHandler: Send + Sync {
    // Required methods
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        request: SetLevelRequest,
        ctx: RequestContext,
    ) -> Pin<Box<dyn Future<Output = ServerResult<EmptyResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn current_level(&self) -> LogLevel;

    // Provided method
    fn logging_capabilities(&self) -> LoggingCapabilities { ... }
}
Expand description

Logging handler trait for processing logging requests

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, request: SetLevelRequest, ctx: RequestContext, ) -> Pin<Box<dyn Future<Output = ServerResult<EmptyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle a log level change request

Source

fn current_level(&self) -> LogLevel

Get current log level

Provided Methods§

Source

fn logging_capabilities(&self) -> LoggingCapabilities

Get logging capabilities

Implementors§