Java logging framework
Logging refers to the recording of activity by an application and is a common issue for development teams.This led to problems when integrating different third-party libraries (JARs) each using different logging frameworks.Logging is typically broken into three major pieces: the Logger, the Formatter and the Appender (or Handler).Both Log4j and the Java logging API support defining handlers higher up the hierarchy.Thus multiple third-party libraries can be incorporated into an application, regardless of the logging framework each has chosen to use.Unlike SLF4J, the Log4j 2 API logs Message[2] objects instead of Strings for extra flexibility and also supports Java Lambda expressions.JCL, SLF4J and the Log4j 2 API are useful when developing reusable libraries which need to write to whichever underlying logging system is being used by the application.The default implementation only provides a few Handlers and Formatters which means most users will have to write their own.