<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Martin Bammer</title>
    <description>The latest articles on DEV Community by Martin Bammer (@martin_bammer_6838a4d3b65).</description>
    <link>https://dev.to/martin_bammer_6838a4d3b65</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4136400%2F5430fc4e-eaad-468b-9c7d-1100453cc725.png</url>
      <title>DEV Community: Martin Bammer</title>
      <link>https://dev.to/martin_bammer_6838a4d3b65</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/martin_bammer_6838a4d3b65"/>
    <language>en</language>
    <item>
      <title>fastlogging-rs: High-Performance Logging for many different Programming Languages</title>
      <dc:creator>Martin Bammer</dc:creator>
      <pubDate>Mon, 21 Sep 2026 20:18:36 +0000</pubDate>
      <link>https://dev.to/martin_bammer_6838a4d3b65/fastlogging-rs-high-performance-logging-for-many-different-programming-languages-772</link>
      <guid>https://dev.to/martin_bammer_6838a4d3b65/fastlogging-rs-high-performance-logging-for-many-different-programming-languages-772</guid>
      <description>&lt;p&gt;Every &lt;code&gt;log.info(...)&lt;/code&gt; call can block your hot path, serialize your threads, and slow down your I/O-bound workloads. That's why I created &lt;strong&gt;fastlogging-rs&lt;/strong&gt;: a Rust-powered logging framework that is extremely fast, thread-safe, and available with a similar API in &lt;strong&gt;8 different programming languages&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Release, 0.9.0, is available with the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial release of the Rust core (fastlogging crate) with bindings for Python, C, C++, Go, Java (FFM and JNI) and C#&lt;/li&gt;
&lt;li&gt;Non-blocking, asynchronous logging — writers run in background threads&lt;/li&gt;
&lt;li&gt;Optional file rotation and compression&lt;/li&gt;
&lt;li&gt;Optional AES &lt;strong&gt;encryption&lt;/strong&gt; for network logging&lt;/li&gt;
&lt;li&gt;Configuration via API or configuration file (JSON, XML, YAML)&lt;/li&gt;
&lt;li&gt;Automatic forwarding of log messages from sub processes to the main process&lt;/li&gt;
&lt;li&gt;Logging to &lt;strong&gt;OpenTelemetry&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Because speed matters…&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Compared to Python’s built-in logging module:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Writing to a file&lt;/strong&gt; is up to &lt;strong&gt;147× faster&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotating file logging&lt;/strong&gt; is up to &lt;strong&gt;207× faster&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Even compared to Apache Log4j, fastlogging-rs is up to 9× faster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When your application logs millions of messages, these speedups can turn minutes into seconds.&lt;br&gt;
fastlogging-rs is written in Rust and comes with thin wrappers for your favorite programming language. All bindings share a similar API, so you can use the same logging concepts across your whole stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rust&lt;/strong&gt; — fastlogging (native core)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt; — pyfastlogging (pyo3, &amp;gt;= 3.10)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt; — cfastlogging (FFI, cbindgen header)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C++&lt;/strong&gt; — cxxfastlogging (type-safe cxx bridge)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C++&lt;/strong&gt; — cppfastlogging (C++17 RAII over the C ABI)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go&lt;/strong&gt; — gofastlogging (cgo wrapper)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Java&lt;/strong&gt; — jfastlogging-ffm (Foreign Function &amp;amp; Memory API)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Java&lt;/strong&gt; — jfastlogging-jni (Java Native Interface)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C#&lt;/strong&gt; — csharpfastlogging (P/Invoke)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Logging calls are &lt;strong&gt;non-blocking&lt;/strong&gt;: each call performs a cheap level check (a single integer comparison, no lock) and hands the message to a channel. A background LoggingThread drains that channel and dispatches to each writer's own thread. The speed of your writers never slows down your application - as long as the queue doesn't run full.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thread-safe logging calls&lt;/li&gt;
&lt;li&gt;Multiple writers (sinks) per logger: console, file, network, syslog, callback&lt;/li&gt;
&lt;li&gt;Optional file rotation and compression&lt;/li&gt;
&lt;li&gt;Optional AES encryption for network logging&lt;/li&gt;
&lt;li&gt;Configuration via API or configuration file (JSON, XML, YAML)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic forwarding of log messages from sub processes to the main process&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation Rust / Python
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo add fastlogging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;pyfastlogging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage example in Rust / Python
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;fastlogging&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;logging_new_default&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;LoggingError&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;LoggingError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="k"&gt;log&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;logging_new_default&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;log&lt;/span&gt;&lt;span class="nf"&gt;.info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, fastlogging!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;log&lt;/span&gt;&lt;span class="nf"&gt;.shutdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastlogging&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Logging&lt;/span&gt;

&lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Logging&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, fastlogging!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shutdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more example see github link below.&lt;/p&gt;

&lt;p&gt;For detailed benchmark data and methodology, see the benchmark documentation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/brmmm3/fastlogging-rs" rel="noopener noreferrer"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also explore the full benchmark results with interactive charts and tables:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://brmmm3.github.io/fastlogging-rs/" rel="noopener noreferrer"&gt;benchmarks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If your application spends time logging, fastlogging-rs can provide substantial performance improvements with minimal code changes — in whichever language you happen to be writing.&lt;/p&gt;

&lt;p&gt;The API is intentionally familiar, making migration from logging, log4j, or your current framework straightforward while unlocking significantly faster execution.&lt;/p&gt;

&lt;p&gt;Source code, documentation, and issue tracker:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/brmmm3/fastlogging-rs" rel="noopener noreferrer"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Licensed under the MIT or Apache-2.0 License.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>performance</category>
      <category>rust</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
