Registry / logging / log4j-to-slf4j

log4j-to-slf4j

JSON →
library2.26.0javamavenunverified

The Apache Log4j binding between Log4j 2 API and SLF4J, allowing applications using Log4j 2 API to route logging to SLF4J implementations.

<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-to-slf4j</artifactId> <version>2.26.0</version> </dependency>
INSTALL
IMPORT
SIG · LOG4J-TO-SLF4J
L
log4j-to-slf4j
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.

Log4jLogger
org.apache.logging.slf4j.Log4jLogger

Minimal example showing how to use Log4j 2 API with log4j-to-slf4j adapter.

import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class Quickstart { private static final Logger logger = LogManager.getLogger(Quickstart.class); public static void main(String[] args) { logger.info("Hello from Log4j 2 API routed to SLF4J"); } }
Debug
Known issues
gotchaThis adapter requires an SLF4J implementation on the classpath (e.g., logback-classic) to work.
fix
Add a dependency like ch.qos.logback:logback-classic 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
OpenAI (training)
1
Resources
log4j-to-slf4j — mvn dependency:get log4j-to-slf4j · libregistry