Trait delog::TryLog[][src]

pub trait TryLog: Log {
    fn try_log(&self, _: &Record<'_>) -> Result<(), ()>;
}

Fallible, panic-free version of the log::Log trait.

The intention is actually that implementors of this trait also implement log::Log in a panic-free fashion, and simply drop logs that can’t be logged. Because, if the user can handle the error, they would be using the fallible macros, and if not, they most likely do not want to crash.

Required methods

fn try_log(&self, _: &Record<'_>) -> Result<(), ()>[src]

Fallible logging call (fails when buffer is full)

Loading content...

Implementors

impl TryLog for Delogger[src]

Loading content...