We better create the log messages using a dedicated library. In this way, it will be easier to maintain our code in the long run.
The Log4j Library
Although many companies that develop in Java prefer to use other libraries (and avoid the Log4j library), its influence on many other libraries cannot be ignored, especially on libraries that appeared in other programming languages. The influence is so strong that some of those other libraries were named with a similar name (e.g. Log4PHP, Log4cxx and Log4Net).
Other Log4j Based Libraries
There are many other libraries, in other programming languages, that emerged based on the Log4j library.
Our Programming Premium Courses
Another important topic that has become more and more important in recent years (following the growth in popularity of Microservices Architecture) is the use of Open Telemetry as an additional tool (in addition to logging) in order to monitor the actions that take place on the server side. If you are not familiar with this topic, we recommend watching the lecture delivered on that topic as part of the XtremePython 2021 conference.