Registry / logging / log4j-jcl

log4j-jcl

JSON →
library2.26.0javamavenunverified

Adapter that routes Apache Commons Logging calls to Log4j 2.

<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-jcl</artifactId> <version>2.26.0</version> </dependency>
INSTALL
IMPORT
SIG · LOG4J-JCL
L
log4j-jcl
loggingjavav2.26.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Log
org.apache.commons.logging.Log

Logs an info message using Commons Logging, which is routed to Log4j 2.

import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class Example { private static final Log log = LogFactory.getLog(Example.class); public static void main(String[] args) { log.info("Hello from Commons Logging via Log4j"); } }
Debug
Known issues
gotchaEnsure log4j-jcl is on the classpath along with Log4j 2 core
fix
Add both log4j-jcl and log4j-core dependencies to your project.
affects: *
Upgrade
Version history
2.26.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
log4j-jcl — mvn dependency:get log4j-jcl · libregistry