Fast logging module written in Rust
See the code
fastlogging-rs is a very fast and versatile logging framework. It supports the following programming languages with similar APIs:
Writers are sinks for the logging data. The following writers are available:
All writers run in background threads. So the speed / slowness of the writers doesn't slow down the application as long as the queue is not running full.
Logging calls are thread safe.
fastlogging-rs supports logging from sub processes to the main process automatically.
So if a sub process logs messages, these messages are forwarded to the main process.
This also works with higher nesting levels. This feature is enabled by default and can be disabled.
As an alternative to API calls, configuration can be done through a configuration file.
Supported formats are JSON, XML and YAML. The configuration file must have the filename fastlogging.<EXT>,
where EXT is one of json, xml or yaml.
Example configuration files (default and full) are available in docs/configs.
To give you an idea how fast fastlogging-rs is, here are some 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 benchmarks can be found in doc/benchmarks in each sub package.
You can explore the full benchmark results with charts and tables: Benchmarks overview (generated from the raw JSON data).
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)
Detailed documentation is available for each language binding:
333 commits
Rust
39.0%
Java
18.5%
HTML
11.2%
C++
8.0%
Go
6.8%
C
6.5%
Python
5.6%
C#
2.7%
Makefile
1.2%
Fast logging module written in Rust
See the code
fastlogging-rs is a very fast and versatile logging framework. It supports the following programming languages with similar APIs:
Writers are sinks for the logging data. The following writers are available:
All writers run in background threads. So the speed / slowness of the writers doesn't slow down the application as long as the queue is not running full.
Logging calls are thread safe.
fastlogging-rs supports logging from sub processes to the main process automatically.
So if a sub process logs messages, these messages are forwarded to the main process.
This also works with higher nesting levels. This feature is enabled by default and can be disabled.
As an alternative to API calls, configuration can be done through a configuration file.
Supported formats are JSON, XML and YAML. The configuration file must have the filename fastlogging.<EXT>,
where EXT is one of json, xml or yaml.
Example configuration files (default and full) are available in docs/configs.
To give you an idea how fast fastlogging-rs is, here are some 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 benchmarks can be found in doc/benchmarks in each sub package.
You can explore the full benchmark results with charts and tables: Benchmarks overview (generated from the raw JSON data).
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)
Detailed documentation is available for each language binding:
333 commits
Rust
39.0%
Java
18.5%
HTML
11.2%
C++
8.0%
Go
6.8%
C
6.5%
Python
5.6%
C#
2.7%
Makefile
1.2%