Skip to main content

Logger

Trait Logger 

Source
pub trait Logger: Debug {
    // Required methods
    fn debug(&self, location: SpanLoc, message: &str);
    fn warn(&self, location: SpanLoc, message: &str);
}
Expand description

A trait to allow replacing logging mechanisms

Required Methods§

Source

fn debug(&self, location: SpanLoc, message: &str)

Logs message from a @debug statement

Source

fn warn(&self, location: SpanLoc, message: &str)

Logs message from a @warn statement

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§