We're trying to force an old vendor-provided Java-program (a JAR) to use log4j2, with the help of the log4j "bridge".
To do this, I:
org/apache/log4j/*
from the vendor's JARlog4j-1.2-api-2.17.1.jar
and the regular log4j-*-2.17.1.jar
files to CLASSPATHThe program dies unable to find the org/apache/log4j/spi/RootLogger
. Listing the contents of the bridge JAR, I find several classes under the org/apache/log4j/spi/
, but the RootLogger
is, indeed, missing.
How do I deal with this?
The newest version 2.17.2 of Log4j2 contains a couple of dozen of fixes to the Log4j 1.x bridge (cf. changelog).
Among them the org.apache.log4j.RootLogger
class has been added to provide binary compatibility with Log4j 1.x.
Warning: many of the added classes are no-ops and just prevent ClassNotFoundException
s as the one in your question.