[][src]Struct mod_logger::config::LogConfigBuilder

pub struct LogConfigBuilder { /* fields omitted */ }

Implementations

impl<'a> LogConfigBuilder[src]

LogConfigBuilder helps creating a configuration for logger.

pub fn new() -> LogConfigBuilder[src]

Create a new LogConfigBuilder with defaults for all config settings.

pub fn from_file<P: AsRef<Path>>(filename: P) -> Result<LogConfigBuilder, Error>[src]

Create LogConfigBuilder with initial values taken from a YAML config file and defaults

pub fn set_default_level(&'a mut self, level: Level) -> &'a mut LogConfigBuilder[src]

Set the default log Level

pub fn set_mod_level(
    &'a mut self,
    module: &str,
    level: Level
) -> &'a mut LogConfigBuilder
[src]

Set the log level for a module Format of module is [::[::]]

pub fn set_log_dest(
    &'a mut self,
    dest: LogDestination,
    file: Option<&PathBuf>
) -> Result<&'a mut LogConfigBuilder, Error>
[src]

Set log destination For stream type destinations the file must be supplied

pub fn set_brief_info(&'a mut self, val: bool)[src]

Enable / disable brief info format. Brief info displays info messages without the source module

pub fn set_color(&'a mut self, val: bool)[src]

Enable / disable colored output

pub fn build(&'a self) -> &'a LogConfig[src]

Build the configuration

Trait Implementations

impl Default for LogConfigBuilder[src]

Auto Trait Implementations

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.