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

sdre-rust-logging

A simple logging library for Rust, with a custom formatter

14 releases

new 0.3.9 Jan 15, 2025
0.3.7 Dec 1, 2024
0.3.6 Nov 10, 2024
0.3.4 Jul 28, 2024
0.1.0 Nov 18, 2023

#291 in Debugging

Download history 184/week @ 2024-09-24 125/week @ 2024-10-01 77/week @ 2024-10-08 46/week @ 2024-10-15 175/week @ 2024-10-22 69/week @ 2024-10-29 135/week @ 2024-11-05 48/week @ 2024-11-12 24/week @ 2024-11-19 163/week @ 2024-11-26 165/week @ 2024-12-03 62/week @ 2024-12-10 56/week @ 2024-12-17 13/week @ 2024-12-24 153/week @ 2024-12-31 312/week @ 2025-01-07

537 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