[][src]Enum flexi_logger::LogTarget

pub enum LogTarget {
    StdErr,
    StdOut,
    File,
    Writer(Box<dyn LogWriter>),
    FileAndWriter(Box<dyn LogWriter>),
    DevNull,
}

Describes the default log target.

All log messages, in which no target is explicitly defined, will be written to the default log target.

See the writers module for how to specify non-default log targets in log macro calls, and the usage of non-default log writers.

Variants

StdErr

Log is written to stderr.

This is the default behavior of flexi_logger.

StdOut

Log is written to stdout.

File

Log is written to a file.

The default pattern for the filename is '<program_name>_<date>_<time>.<suffix>', e.g. myprog_2015-07-08_10-44-11.log.

Writer(Box<dyn LogWriter>)

Log is written to an alternative LogWriter implementation.

FileAndWriter(Box<dyn LogWriter>)

Log is written to a file, as with LogTarget::File, and to an alternative LogWriter implementation.

DevNull

Log is processed as if it were written, but is finally not written.

This can be useful for running tests with all log-levels active to ensure that the log calls which are normally not active will not cause undesired side-effects when activated (note that the log macros may prevent arguments of inactive log-calls from being evaluated).

Auto Trait Implementations

Blanket Implementations

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.

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

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

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