[][src]Crate pretty_env_logger

A logger configured via an environment variable which writes to standard error with nice colored output for log levels.

Example

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

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

    trace!("a trace example");
    debug!("deboogging");
    info!("such information");
    warn!("o_O");
    error!("boom");
}

Functions

formatted_builder

Returns a env_logger::Builder for further customization.

formatted_timed_builder

Returns a env_logger::Builder for further customization.

init

Initializes the global logger with a pretty env logger.

init_custom_env

Initialized the global logger with a pretty env logger, with a custom variable name.

init_timed

Initializes the global logger with a timed pretty env logger.

try_init

Initializes the global logger with a pretty env logger.

try_init_custom_env

Initialized the global logger with a pretty env logger, with a custom variable name.

try_init_timed

Initializes the global logger with a timed pretty env logger.

try_init_timed_custom_env

Initialized the global logger with a timed pretty env logger, with a custom variable name.