[][src]Crate loge

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

Example

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

use std::env;

fn main() {
    env::set_var("RUST_LOG", "trace");
    loge::init();

    trace!("this is trace level");
    debug!("meet a note");
    info!("everything is normal");
    warn!("be careful");
    error!("something error");
}

Re-exports

pub extern crate env_logger;

Functions

formatted_builder

Returns a env_logger::Builder for further customization.

init

Initializes the global logger with a logger named loge.

init_custom_env

Initialized the global logger with a logger named loge, with a custom variable name.

try_init

Initializes the global logger with a logger named loge.

try_init_custom_env

Initialized the global logger with a logger named loge, with a custom variable name.