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

sdre-rust-logging

A simple logging library for Rust, with a custom formatter

7 releases

new 0.3.2 May 13, 2024
0.3.1 Mar 18, 2024
0.3.0 Feb 3, 2024
0.2.2 Jan 19, 2024
0.1.0 Nov 18, 2023

#270 in Debugging

Download history 15/week @ 2024-01-22 24/week @ 2024-01-29 49/week @ 2024-02-05 77/week @ 2024-02-12 65/week @ 2024-02-19 112/week @ 2024-02-26 19/week @ 2024-03-04 103/week @ 2024-03-11 302/week @ 2024-03-18 32/week @ 2024-03-25 55/week @ 2024-04-01 123/week @ 2024-04-08 135/week @ 2024-04-15 161/week @ 2024-04-22 90/week @ 2024-04-29 32/week @ 2024-05-06

437 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