brmmm3/fastlogging-rs

Fast logging module written in Rust

Rust

3

333 commits

updated Sep 21, 2026

See the code

See what people are saying (1)

README

fastlogging-rs

fastlogging-rs

fastlogging-rs is a very fast and versatile logging framework. It supports the following programming languages with similar APIs:

Features

  • Extremely fast — logging calls are non-blocking and writers run in background threads
  • Thread-safe logging calls
  • Multiple writers (sinks) per logger: console, file, network, syslog, callback, …
  • Optional file rotation and compression
  • Optional AES encryption for network logging
  • Configuration via API or configuration file (JSON, XML, YAML)
  • Automatic forwarding of log messages from sub processes to the main process

Writers

Writers are sinks for the logging data. The following writers are available:

  • Console (optional colored)
  • File (optional rotation and compression)
  • TCP client (optional authentication key and AES encryption)
  • Syslog (Linux), EventLog (Windows)
  • Callback function

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.

Threads

Logging calls are thread safe.

Processes

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.

Configuration

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.

Benchmarks

To give you an idea how fast fastlogging-rs is, here are some benchmarks:

Writing to a file

FrameworkTime
Python logging29.37s
log4j1.48s
fastlogging-rs0.2s

Rotating file logging

FrameworkTime
Python logging35.24s
log4j1.56s
fastlogging-rs0.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).

Usage

Rust

use fastlogging::{logging_new_default, LoggingError};

fn main() -> Result<(), LoggingError> {
    let mut log = logging_new_default()?;
    log.info("Hello, fastlogging!")?;
    log.shutdown(false)?;
    Ok(())
}

Python

from fastlogging import Logging

log = Logging()
log.info("Hello, fastlogging!")
log.shutdown(False)

Documentation

Documentation

Detailed documentation is available for each language binding:

Contributors

brmmm3

333 commits

brmmm3/fastlogging-rs

Fast logging module written in Rust

Rust

3

333 commits

updated Sep 21, 2026

See the code

See what people are saying (1)

README

fastlogging-rs

fastlogging-rs

fastlogging-rs is a very fast and versatile logging framework. It supports the following programming languages with similar APIs:

Features

  • Extremely fast — logging calls are non-blocking and writers run in background threads
  • Thread-safe logging calls
  • Multiple writers (sinks) per logger: console, file, network, syslog, callback, …
  • Optional file rotation and compression
  • Optional AES encryption for network logging
  • Configuration via API or configuration file (JSON, XML, YAML)
  • Automatic forwarding of log messages from sub processes to the main process

Writers

Writers are sinks for the logging data. The following writers are available:

  • Console (optional colored)
  • File (optional rotation and compression)
  • TCP client (optional authentication key and AES encryption)
  • Syslog (Linux), EventLog (Windows)
  • Callback function

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.

Threads

Logging calls are thread safe.

Processes

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.

Configuration

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.

Benchmarks

To give you an idea how fast fastlogging-rs is, here are some benchmarks:

Writing to a file

FrameworkTime
Python logging29.37s
log4j1.48s
fastlogging-rs0.2s

Rotating file logging

FrameworkTime
Python logging35.24s
log4j1.56s
fastlogging-rs0.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).

Usage

Rust

use fastlogging::{logging_new_default, LoggingError};

fn main() -> Result<(), LoggingError> {
    let mut log = logging_new_default()?;
    log.info("Hello, fastlogging!")?;
    log.shutdown(false)?;
    Ok(())
}

Python

from fastlogging import Logging

log = Logging()
log.info("Hello, fastlogging!")
log.shutdown(False)

Documentation

Documentation

Detailed documentation is available for each language binding:

Contributors

brmmm3

333 commits

Languages

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%