[][src]Struct mod_logger::Logger

pub struct Logger { /* fields omitted */ }

The Logger struct holds a singleton containing all relevant information.

struct Logger has a private constructor. It is used via its static interface which will instantiate a Logger or use an existing one.

Implementations

impl<'a> Logger[src]

pub fn flush()[src]

Flush the contents of log buffers

pub fn create()[src]

create a default logger

pub fn set_default_level(log_level: Level)[src]

Initialise a Logger with the given default log_level or modify the default log level of the existing logger

pub fn get_default_level(&self) -> Level[src]

Retrieve the default level of the logger

pub fn set_mod_level(module: &str, log_level: Level)[src]

Modify the log level for a module

pub fn get_buffer() -> Option<Vec<u8>>[src]

Retrieve the current log buffer, if available

pub fn set_log_dest<S: 'static + Write + Send>(
    dest: &LogDestination,
    stream: Option<S>
) -> Result<(), Error>
[src]

Set the log destination

pub fn set_log_file(
    log_dest: &LogDestination,
    log_file: &Path,
    buffered: bool
) -> Result<(), Error>
[src]

Set log destination and log file.

pub fn get_log_dest() -> LogDestination[src]

Retrieve the current log destination

pub fn set_log_config(log_config: &LogConfig) -> Result<(), Error>[src]

Set the log configuration.

pub fn set_color(color: bool)[src]

Enable / disable colored output

pub fn set_timestamp(val: bool)[src]

Enable / disable timestamp in messages

pub fn set_brief_info(val: bool)[src]

Enable / disable brief info messages

Trait Implementations

impl Clone for Logger[src]

impl Log for Logger[src]

Auto Trait Implementations

impl !RefUnwindSafe for Logger

impl Send for Logger

impl Sync for Logger

impl Unpin for Logger

impl UnwindSafe for Logger

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.