I want to use log4j2 Commons Logging Bridge with shared access 1.2. I tried using something like the following:
import org.apache.logging.log4j.jcl.LogFactoryImpl; public class MyClass{ private static Log log = LogFactoryImpl.getLog(DropinsBundleDeployer.class); . . . log.error("Error occured", e); }
But when I run the code, I get the following problem and do not see any log:
log4j:WARN Please initialize the log4j system properly.
However, the log4j2.xml file is in the class path. How can I use commons logging 1.2 with log4j2 correctly?
java apache-commons logging log4j log4j2
Grant
source share