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
235 downloads per month
Used in 4 crates
17KB
306 lines
mlzlog in Rust
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