DESOSA 2022

Log4j2

Figure: Apache Log4j2 Logo

Apache Log4j 2 is a Java-based logging framework and is widely used in software or components related to the java language. Log4j 2 is an upgrade to Log4j that has significant performance improvements, a new plugin system, and many improvements in configuration settings. Otherwise, Log4j 2 contains next-generation Asynchronous Loggers which perform 18 times higher throughput and orders of magnitude lower latency than Log4j 1.x and Logback in multi-threaded scenarios.

Authors

Longfei Lin

First year Embedded Systems student with a specialisation in Software and Networking. Passionate about technology.

Ting Liang

Student from embedded systems. A eager learner

Bowu Li

MSc Embedded Systems student at TU Delft

Zhaoxi Liu

Master's student on track Software and Networking, interested in learning software development technologies

Log4j2 - Scalability

Scalability is a design concept that represents our vision of the future. “Even if a system is working reliably today, that doesn’t mean it will necessarily work reliably in the future”1. Therefore, when certain aspects change in the future, we hope that based on the existing architecture, developers can achieve a linear increase in overall system performance with only a few changes. Simply put, it is to adapt the current design to uncertain future changes.

Log4j2 - Quality and Evolution

Key quality attributes and current status The key quality attributes discussed in previous essays are performance and security. Performance Peak throughput is one of the critical indexes of a logging system. It measures the maximum throughput over a short period and describes the system’s ability to handle bursts. Log4j2 featuring using an Asynchronous logger can provide the best performances compared to the major counterparts and is even capable of offering larger throughput with more threads, while others remain the same or decrease 1.

Log4j2 - From Vision to Architecture

To capture the architectural elements and relationships of Log4j2, in this essay, we first explore the architectural style and design patterns applied in Log4j2, then we depict the architecture from multiple views, finally, we briefly summarize the API design principles of Log4j2. Main architectural style At the beginning of Log4j2 design, its goal is to implement a simple and efficient logging framework that is perfectly compatible with existing logging tools such as SLF4J or Log4j 1.

Log4j2 - Product Vision & Problem Analysis

Figure: Apache Log4j2 Logo Introduction A log file is a collection of files used to record system operation events. It plays an important role in processing historical data, tracing problems, and understanding system activities. In software development, developers use a variety of logging frameworks to record the running information of the program. The presence or absence of logs does not affect the performance of the application, but an application without logs is incomplete because of its importance at all stages of development.