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

mlzlog

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

14 releases (7 breaking)

0.8.1 Jun 19, 2023
0.7.0 Feb 5, 2021
0.6.0 Mar 15, 2020
0.5.2 Sep 5, 2019
0.2.1 Jun 29, 2017

#5 in #colored

Download history 14/week @ 2024-02-12 19/week @ 2024-02-19 28/week @ 2024-02-26 10/week @ 2024-03-04 16/week @ 2024-03-11 4/week @ 2024-03-18 281/week @ 2024-04-01

303 downloads per month
Used in 4 crates

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

18KB
316 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

~4–12MB
~100K SLoC