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

sdre-rust-logging

A simple logging library for Rust, with a custom formatter

6 releases

0.3.1 Mar 18, 2024
0.3.0 Feb 3, 2024
0.2.2 Jan 19, 2024
0.2.0 Dec 7, 2023
0.1.0 Nov 18, 2023

#267 in Debugging

Download history 45/week @ 2023-12-22 79/week @ 2023-12-29 126/week @ 2024-01-05 90/week @ 2024-01-12 51/week @ 2024-01-19 24/week @ 2024-01-26 38/week @ 2024-02-02 39/week @ 2024-02-09 97/week @ 2024-02-16 77/week @ 2024-02-23 68/week @ 2024-03-01 95/week @ 2024-03-08 252/week @ 2024-03-15 92/week @ 2024-03-22 47/week @ 2024-03-29 43/week @ 2024-04-05

446 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