3 releases
0.1.2 | Sep 2, 2022 |
---|---|
0.1.1 | Sep 2, 2022 |
0.1.0 | Sep 2, 2022 |
#765 in Debugging
6KB
103 lines
se-logger
Simple customizable logging crate.
lib.rs
:
se-logger
Simple customizable logging crate.
Getting started
use se_logger::*;
fn main() {
// Initialize the logger with the log file path and log level
// File path will be test_19_35_33.log (for example)
log_init("test_%H_%M_%S.log", INFO);
// Now you can use the library anywhere
info("This is an info message");
error("This is an error message");
}
Output:
[19:35:33] [INFO] [main] This is an info message
[19:35:33] [ERROR] [main] This is an error message
Dependencies
~1MB
~18K SLoC