A high-performance logging framework written in Rust.
Project details
Fastlogging-rs offers a versatile, high-speed logging solution for multiple programming languages, including Rust, Python, C, and more. With non-blocking calls, thread-safety, and configurable writers, it ensures efficient logging without slowing applications down. Ideal for developers seeking reliable and quick logging capabilities.
fastlogging-rs is a high-performance and flexible logging framework designed for multiple programming languages. This robust library enables developers to implement efficient logging in the following languages, all featuring similar APIs:
The framework supports multiple writers, including:
All writers function in background threads, ensuring that logging operations do not hinder application performance as long as the queue remains manageable.
Users can choose to configure logging via API or by utilizing a configuration file named fastlogging.<EXT> where <EXT> can be json, xml, or yaml. Sample configuration files can be found in the docs/configs directory.
fastlogging-rs stands out in terms of speed, as demonstrated by the following benchmarks:
| Framework | Time |
|---|---|
| Python logging | 29.37s |
| log4j | 1.48s |
| fastlogging-rs | 0.2s |
| Framework | Time |
|---|---|
| Python logging | 35.24s |
| log4j | 1.56s |
| fastlogging-rs | 0.17s |
More detailed benchmarks, including charts and tables, can be found in doc/benchmarks within each sub-package or explore the complete benchmark overview here.
use fastlogging::{logging_new_default, LoggingError};
fn main() -> Result<(), LoggingError> {
let mut log = logging_new_default()?;
log.info("Hello, fastlogging!")?;
log.shutdown(false)?;
Ok(())
}
from fastlogging import Logging
log = Logging()
log.info("Hello, fastlogging!")
log.shutdown(False)
Comprehensive documentation is available for each language binding, ensuring developers can easily implement and utilize the logging framework:
Comments
0Start the conversation
Share the first comment.