Modern application Logging with Log4j2

After 20 years of evolution in the Java ecosystem, the ways of Logging have seen different strategies, trends, and architectures. Nowadays, several Logging frameworks can be found among the used third-party dependencies. We must support them all to debug an application or to trace runtime events.

Getting ready

This recipe provides a future-proof implementation of Log4j2 for the CloudStreet Market application. It requires several Maven dependencies to be added to our modules. As a solution, it can appear quite complicated, but in reality the amount of Logging frameworks to support is limited, and the logic behind a Log4j2 migration is fairly straightforward.

How to do it…

  1. The following Maven dependencies have ...

Get Spring MVC Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.