1 unstable release

0.0.0 May 31, 2023

#23 in #log-debug

23 downloads per month

Apache-2.0

470KB
3.5K SLoC

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


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

preview

Dependencies

~2.3–4MB
~70K SLoC