Crate clogger

Source
Expand description

Simple console logger that is configurable at runtime for command line apps.

§Example

extern crate clogger;
#[macro_use]
extern crate log;

fn main() {
    clogger::init();

    debug!("this is a debug message and will be hidden");
    error!("this is printed by default");

    clogger::set_verbosity(2);

    debug!("verbosity increased, this will now be displayed");
}

Functions§

init
Initialize the global logger.
quiet
Check if quiet mode is enabled.
set_quiet
Turn quiet mode on or off.
set_verbosity
Set the current logger verbosity level.
try_init
Attempts to initialize the global logger.
verbosity
Get the current logger verbosity level.