Trait Log

Source
pub trait Log: Default {
    // Required methods
    fn log(&self, level: Level, args: &Arguments<'_>);
    fn tag(&mut self, t: &'static str);

    // Provided methods
    fn debug(&self, args: &Arguments<'_>) { ... }
    fn info(&self, args: &Arguments<'_>) { ... }
    fn warn(&self, args: &Arguments<'_>) { ... }
    fn error(&self, args: &Arguments<'_>) { ... }
    fn panic(&self, info: &PanicInfo<'_>) { ... }
}

Required Methods§

Source

fn log(&self, level: Level, args: &Arguments<'_>)

Log message

Source

fn tag(&mut self, t: &'static str)

Provided Methods§

Source

fn debug(&self, args: &Arguments<'_>)

Source

fn info(&self, args: &Arguments<'_>)

Source

fn warn(&self, args: &Arguments<'_>)

Source

fn error(&self, args: &Arguments<'_>)

Source

fn panic(&self, info: &PanicInfo<'_>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§