pub trait GenericLogger {
    // Required methods
    fn log_generic(&self, level: u8, message: Generic);
    fn to_logpass(self) -> Logpass;
    fn to_compatibility(self) -> Compatibility;
}
Expand description

Trait for a generic logger, allows Logpass to pass Generic to this logger

Required Methods§

source

fn log_generic(&self, level: u8, message: Generic)

Log a generic message, used by Logpass

source

fn to_logpass(self) -> Logpass

Consume this logger to create a logpass

source

fn to_compatibility(self) -> Compatibility

Turn the logger into a function that takes messages

Useful when crossing boundaries into libraries that only take this compatibility type. The type only refers to globally accessible types, so it can be used everywhere without introducing dependencies.

See Compatibility for examples.

Implementors§