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

sdre-rust-logging

A simple logging library for Rust, with a custom formatter

13 releases

0.3.8 Jan 3, 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

#290 in Debugging

Download history 166/week @ 2024-09-23 144/week @ 2024-09-30 73/week @ 2024-10-07 50/week @ 2024-10-14 103/week @ 2024-10-21 144/week @ 2024-10-28 106/week @ 2024-11-04 76/week @ 2024-11-11 22/week @ 2024-11-18 132/week @ 2024-11-25 198/week @ 2024-12-02 60/week @ 2024-12-09 58/week @ 2024-12-16 14/week @ 2024-12-23 142/week @ 2024-12-30 321/week @ 2025-01-06

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