Struct fern::DispatchConfig [] [src]

pub struct DispatchConfig<'a> {
    pub format: Box<Formatter>,
    pub output: Vec<OutputConfig<'a>>,
    pub level: LogLevelFilter,
}

This is the base logger configuration in fern.

All DispatchConfig will do is filter log messages based on level, pass the message through the Formatter, and then pass on to any number of output loggers.

Fields

format: Box<Formatter>

The format for this logger. All log messages coming in will be sent through this closure before being sent to child loggers.

output: Vec<OutputConfig<'a>>

A list of loggers to send messages to. Any messages that are sent to this logger that aren't filtered are sent to each of these loggers in turn.

level: LogLevelFilter

The level of this logger. Any messages which have a lower level than this level won't be passed on.

Trait Implementations

impl<'a> IntoLog for DispatchConfig<'a>
[src]

fn into_fern_logger(self) -> Result<Box<Logger>>

Builds this configuration into a fern::Logger that you can send messages to. This method can be used to generate a logger you can call manually, and catch any errors from. You probably want to use fern::init_global_logger() instead of calling this directly. Read more

fn into_log(self) -> Result<Box<Log>>

Builds this configuration into a log::Log that you can send messages to. This will open any files, get handles to stdout/stderr, etc. depending on which type of logger this is. Read more