#logging #formatter #replace #standard #info #sdre #setup-logging

sdre-rust-logging

A simple logging library for Rust, with a custom formatter

8 releases

0.3.3 Jun 30, 2024
0.3.2 May 13, 2024
0.3.1 Mar 18, 2024
0.3.0 Feb 3, 2024
0.1.0 Nov 18, 2023

#264 in Debugging

Download history 229/week @ 2024-03-13 125/week @ 2024-03-20 43/week @ 2024-03-27 52/week @ 2024-04-03 150/week @ 2024-04-10 220/week @ 2024-04-17 107/week @ 2024-04-24 36/week @ 2024-05-01 196/week @ 2024-05-08 194/week @ 2024-05-15 103/week @ 2024-05-22 102/week @ 2024-05-29 69/week @ 2024-06-05 155/week @ 2024-06-12 51/week @ 2024-06-19 217/week @ 2024-06-26

495 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