#logging #formatter #replace #standard #format #output #sdre

sdre-rust-logging

A simple logging library for Rust, with a custom formatter

12 releases

new 0.3.7 Dec 1, 2024
0.3.6 Nov 10, 2024
0.3.5 Oct 28, 2024
0.3.4 Jul 28, 2024
0.1.0 Nov 18, 2023

#284 in Debugging

Download history 116/week @ 2024-08-11 106/week @ 2024-08-18 45/week @ 2024-08-25 179/week @ 2024-09-01 16/week @ 2024-09-08 95/week @ 2024-09-15 166/week @ 2024-09-22 145/week @ 2024-09-29 73/week @ 2024-10-06 49/week @ 2024-10-13 104/week @ 2024-10-20 141/week @ 2024-10-27 32/week @ 2024-11-03 151/week @ 2024-11-10 22/week @ 2024-11-17 18/week @ 2024-11-24

238 downloads per month

MIT license

9KB
128 lines

sdre-rust-logging

This crate provides logging traits/structs that automatically format log output.

Usage Example

In this example, we will see a drop in replacement for the standard log crate's info! macro

use sdre_rust_logging::SetupLogging;

fn main() {
    let logger: u8 = 0;
    logger.enable_logging();
    info!("Hello World!"); // will print
    debug!("Hello World!"); // will not print
}

Dependencies

~1.5MB
~24K SLoC