with

Function with 

Source
pub fn with() -> MutexGuard<'static, LogPrefs>
Expand description

Returns a reference to the global preferences object, used for modifying preferences.

ยงExample

use bunt_logger::{ColorChoice, Level};

fn main() {
    bunt_logger::with()
        .level(Level::Debug)
        .stdout(ColorChoice::Never);
}
Examples found in repository?
examples/basic.rs (line 4)
3fn main() {
4    bunt_logger::with()
5        .level(Level::Trace)
6        .stderr(ColorChoice::Always);
7
8    error!("{$red+bold}A red and bold error message!{/$}");
9    warn!("{$yellow}A yellow warning message!{/$}");
10    info!("{$green}A green info message!{/$}");
11    debug!("{$cyan}A cyan debug message!{/$}");
12    trace!("{$white+dimmed}A white and dimmed trace message!{/$}");
13}