| Crates.io | log4rc |
| lib.rs | log4rc |
| version | 0.1.2 |
| created_at | 2025-09-30 09:31:05.124038+00 |
| updated_at | 2025-09-30 09:41:04.51581+00 |
| description | A log4j-like logging framework for Rust |
| homepage | https://git.kingecg.top/kingecg/log4r.git |
| repository | https://git.kingecg.top/kingecg/log4r.git |
| max_upload_size | |
| id | 1860884 |
| size | 19,290 |
A log4j-like logging framework for Rust.
log4r is a simple, extensible logging framework inspired by log4j. It provides different log levels and an easy-to-use API for Rust applications.
Add this to your Cargo.toml:
[dependencies]
log4r = "0.1"
use log4r::{LogLevel, Logger};
fn main() {
// Initialize the logger with Debug level
Logger::init(LogLevel::Debug);
// Test all log levels
log4r::trace!("This is a trace message - won't be printed");
log4r::debug!("This is a debug message - will be printed");
log4r::info!("This is an info message - will be printed");
log4r::warn!("This is a warning message - will be printed");
log4r::error!("This is an error message - will be printed");
}
This project is licensed under the MIT License - see the LICENSE file for details.