pub struct JloggerBuilder { /* private fields */ }

Implementations

Create a new JloggerBuilder which is used to build a Jlogger.

Examples
    use log::LevelFilter;
    use jlogger::JloggerBuilder;

    JloggerBuilder::new()
       .max_level(LevelFilter::Debug)
       .log_console(true)
       .log_mark(true)
       .log_file("/tmp/mylog.log")
       .build();

Set the max level to be outputed. Log messages with a level below it will not be outputed. At runtime, the log level can be filterred though “JLOGGER_LEVEL” environment variable.

If enabled, log message will be printed to the console. Default is true.

Log file name. If specifed, log message will be outputed to it.

If enabled, a mark string will be printed together with the log message. By default, the mark string is set to the process name, it can be specifed though “JLOGGER_MARK” environment variable.

Build a Jlogger.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.