Skip to main content

DebugLogger

Struct DebugLogger 

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

A logger that writes to the debug output (DebugLogger), the messages of its level and above.

A message with a type is written with the name of the type as its category, as Debug.WriteLine(message, category) writes it: Category: message.

Implementations§

Source§

impl DebugLogger

Source

pub fn new() -> Self

A logger at the level Debug.

Source

pub fn set_level(&self, level: LogLevel)

Sets the level (Level { set; }).

Trait Implementations§

Source§

impl Default for DebugLogger

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl ILogger for DebugLogger

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.