Log management
Log management has been taken for granted so far in the book. Let's just take a quick glance over some basic concepts related to producing logs in our Java applications.
Logging in Java has had a troubled history. At the very beginning, no standard was provided as part of the Java platform. When a standard (such as Java Util Logging (JUL)) was added to the platform (in release 1.4), other alternative frameworks were available, such as Apache Commons Logging and Log4j.
At the time of writing, Log4j has been deprecated and replaced by Log4j2 and logback.
Even though the JUL standard has been a part of the platform for many years now, the usage of alternative frameworks such as logback and Log4j2 is still very widespread, due to their features and performance. Regardless of which implementation we choose, there are some common concepts to consider.
Common concepts in logging frameworks
As described previously, no matter what kind of preferred log implementation...