Skip to main content

WrappingLogLevelLogger

Struct WrappingLogLevelLogger 

Source
pub struct WrappingLogLevelLogger { /* private fields */ }
Expand description

A logger that writes each message with its level in front, Level: message (WrappingLogLevelLogger).

Implementations§

Source§

impl WrappingLogLevelLogger

Source

pub fn new(inner: Rc<dyn ILogger>) -> Self

A logger over inner.

Trait Implementations§

Source§

impl ILogger for WrappingLogLevelLogger

Source§

fn level(&self) -> LogLevel

The level from which the logger writes (Level).
Source§

fn write(&self, message: &str, log_level: LogLevel)

Writes message (Write(string, LogLevel)).
Source§

fn write_exception( &self, exception: &dyn Error, message: &str, log_level: LogLevel, )

Writes message with exception (Write(Exception, string, LogLevel)).
Source§

fn write_with_type( &self, message: &str, type_name: &'static str, log_level: LogLevel, )

Writes message of the type type_name (Write(string, Type, LogLevel)).
Source§

fn write_exception_with_type( &self, exception: &dyn Error, message: &str, type_name: &'static str, log_level: LogLevel, )

Writes message with exception, of the type type_name (Write(Exception, string, Type, LogLevel)).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.