#python-packages #rolling #logging #colored #mlz

mlzlog

A collection of log4rs tools to log like the mlzlog Python package

16 releases

0.8.3 Oct 3, 2024
0.8.2 Jul 11, 2024
0.8.1 Jun 19, 2023
0.7.0 Feb 5, 2021
0.2.1 Jun 29, 2017

#6 in #colored

Download history 7/week @ 2024-06-24 1/week @ 2024-07-01 111/week @ 2024-07-08 10/week @ 2024-07-15 24/week @ 2024-07-29 2/week @ 2024-08-26 22/week @ 2024-09-16 41/week @ 2024-09-23 158/week @ 2024-09-30 14/week @ 2024-10-07

235 downloads per month
Used in 4 crates

MIT/Apache and maybe LGPL-2.1-or-later WITH GCC-exception-2.0

17KB
306 lines

mlzlog in Rust

Latest Version

Documentation

This is a Rust crate that provides a log4rs configuration with custom appenders that logs like the mlzlog Python package.

Installation

This crate works with Cargo and can be found on crates.io with a Cargo.toml like:

[dependencies]
log = "0.4"
mlzlog = "0.8"

Minimum supported Rust versions is 1.63.0.

Usage

Initialize logging at the beginning of your program and then use the macros from the log crate. Example:

use log::info;

fn main() {
    mlzlog::init("/path/to/base", "myapp", mlzlog::Settings { ... });

    info!("starting up");
}

lib.rs:

A collection of log4rs appenders and configuration for logging in the same style as the Python package mlzlog.

Dependencies

~3.5–9.5MB
~81K SLoC