Crate loge

Source
Expand description

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

§Example



env::set_var("RUST_LOG", "trace");
env::set_var("LOGE_FORMAT", "target");
loge::init(); // Or `loge::init_with_file("your-app.log");`

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

Enums§

LogeFormat
LogeFormat is used to choose log format.

Functions§

init
Initializes the global logger.
init_custom
Initialized the global logger with a logger named loge, with a custom config
init_custom_env
Initialized the global logger with a logger named loge, with a custom custom variable name.
try_init
Initializes the global logger with a logger named loge.
try_init_custom
Initialized the global logger with a logger named loge, with a custom config
try_init_custom_env
Initialized the global logger with a logger named loge, with a custom custom variable name.