pub trait LogError<T, E>: Sized {
    fn log_level_with<F: FnOnce(E) -> String>(
        self,
        level: Level,
        cb: F
    ) -> Option<T>; fn log_error_with<F: FnOnce(E) -> String>(self, cb: F) -> Option<T> { ... } fn log_warn_with<F: FnOnce(E) -> String>(self, cb: F) -> Option<T> { ... } fn log_error(self, msg: &str) -> Option<T>
    where
        E: Display
, { ... } fn log_error_detail(self, msg: &str) -> Option<T>
    where
        E: Debug
, { ... } fn log_warn(self, msg: &str) -> Option<T>
    where
        E: Display
, { ... } fn log_warn_detail(self, msg: &str) -> Option<T>
    where
        E: Debug
, { ... } }
Expand description

Trait to log the error result, there are impls for Result and Option by default.

Required Methods

log the error with specific log-level and format handler

Provided Methods

log a error message with specific format handler

log a warn message with specific format handler

log the error with specific prefix

log the error with specific prefix in a detailed format

log the error with specific prefix as a warn message

log the error with specific prefix in a detailed format as a warn message

Implementations on Foreign Types

Implements LogError for Result

Implements LogError for Option

Implementors