Lo4j2 Async Logger and Benchmark

Lo4j is an old logging framework. Sometime ago Logback was faster than lo4j. Now, lo4j2 is the fastest and coolest kid on the block.  Logs are the eldest and primitive form of observability. IMHO observability has many different use cases such as Troubleshooting, Business Discovery, Performance Troubleshooting, Reliability Assurance, and Testing. IMHO you could use logs for all those use cases, however, IMHO logs are best suited for troubleshooting and metrics and better suited for general observability. Logs can destroy application performance and often are the number 1 culprit of slowness. Log4j2 makes logging faster due to async logging and LMAX Disturptor as the secret source. However I would question if you just use logs nor dont use metrics and traces. 

For this blog post, I want to share how to use Log4j2 async logging and also a very simple logging benchmark. So I made a simple video. Let's get started!

The Video

The Code

https://github.com/diegopacheco/java-pocs/tree/master/pocs/lo4j2-async-log-fun

Cheers,

Diego Pacheco

Popular posts from this blog

Kafka Streams with Java 15

Rust and Java Interoperability

HMAC in Java