Can apache-log4j-extras jar be used with apache log4j 2.x jars, or is it deprecated?
found the jar to be last updated in 1.2.17 version.
CodePudding user response:
Since Apache Log4j 1.2 reached end-of-life almost 8 years ago, Apache Log4j Extras and libraries with Log4j 1.2 components should be considered deprecated.
All features provided by Apache Log4j Extras should be available in the reference implementation of the Log4j2 API and other implementations (such as Logback).
PS: For completeness' sake, the Log4j 1.2 to Log4j2 API bridge does support native Log4j 1.2 components (works only if the underlying implementation is Log4j2 Core) and as a proof-of-concept I have successfully run the RollingFileAppender
from Apache Extras. This usage is however not advised since native Log4j2 Core components perform much better.
If you just use the Log4j 1.2 configuration format, since 2.18.0 (cf. LOG4J2-3483), we added a configuration builder that recognizes the RollingFileAppender
from Apache Extras and builds a Log4j2 native RollingFileAppender
with the same configuration properties.