log-l10n

Crates.iolog-l10n
lib.rslog-l10n
version0.0.0
sourcesrc
created_at2023-05-31 00:29:48.827377
updated_at2023-05-31 00:29:48.827377
descriptionLocalization support for log
homepage
repositoryhttps://github.com/2moe/log-l10n
max_upload_size
id878417
size496,523
Moe (2moe)

documentation

README

Log-L10n

L10n support for log.

log-l10n.crate

Documentation Apache-2 licensed

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");
}

preview

Commit count: 3

cargo fmt