1 unstable release
0.0.0 | May 31, 2023 |
---|
#23 in #log-debug
23 downloads per month
470KB
3.5K
SLoC
Log-L10n
L10n support for log.
Quick Start
cargo add log-l10n --features=env-logger
cargo add log
use log_l10n::logger::{before_init, env_logger};
fn main() {
let env_name = "CUSTOM_LOG_ENV";
let pkg = log_l10n::get_pkg_name!();
before_init(pkg, env_name);
env_logger::init(env_name, Some("info"));
log::info!("Hello");
log::error!("Err MSG");
log::debug!("World");
}
lib.rs
:
Log-L10n
L10n support for log.
Quick Start
add deps
cargo add log-l10n --features=env-logger
cargo add log
use log_l10n::logger::{before_init, env_logger};
let env_name = "CUSTOM_LOG_ENV";
let pkg = log_l10n::get_pkg_name!();
before_init(pkg, env_name);
env_logger::init(env_name, Some("info"));
log::info!("Hello");
log::error!("Err MSG");
log::debug!("World");
Dependencies
~2.3–4MB
~70K SLoC