Crates.io | log-l10n |
lib.rs | log-l10n |
version | 0.0.0 |
source | src |
created_at | 2023-05-31 00:29:48.827377 |
updated_at | 2023-05-31 00:29:48.827377 |
description | Localization support for log |
homepage | |
repository | https://github.com/2moe/log-l10n |
max_upload_size | |
id | 878417 |
size | 496,523 |
L10n support for log.
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");
}