[][src]Struct logosaurus::Logger

pub struct Logger<W: Write + Send> { /* fields omitted */ }

Represents a logging object that writes to a specified output. It can be used simultaneously from multiple threads; it guarantees to serialize writes.

Use LoggerBuilder to construct a Logger, or use Logger::default().

Implementations

impl<W: Write + Send> Logger<W>[src]

pub fn builder(w: W) -> LoggerBuilder<W>[src]

Returns a LoggerBuilder that can be used to build a Logger.

pub fn write_output(
    &self,
    level: Level,
    target: &str,
    file: Option<&str>,
    line: Option<u32>,
    s: &str
)
[src]

Writes the given string s using the logger. Typically, you would not use this directly but instead use the macros provided by the log crate.

Trait Implementations

impl Default for Logger<Stderr>[src]

fn default() -> Logger<Stderr>[src]

Returns a default Logger.

A default Logger has

  • level: log::LevelFilter::Trace,
  • out: stderr,
  • flags: L_STD, and
  • prefix: "" (empty string)

impl<W: Write + Send> Log for Logger<W>[src]

Auto Trait Implementations

impl<W> RefUnwindSafe for Logger<W>

impl<W> Send for Logger<W>

impl<W> Sync for Logger<W>

impl<W> Unpin for Logger<W> where
    W: Unpin

impl<W> UnwindSafe for Logger<W>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.