Apache logging services logo Apache log4j logo

SLF4J Bridge

The SLF4J Bridge allows applications coded to the SLF4J API to use Log4j 2 as the implementation.

Requirements

The SLF4J bridge requires at least Java 6 and has a dependency on the Log4j 2 API.

Usage

The SLF4J bindings provided in this Bridge cause all the SLF4J APIs to be routed to Log4j 2. Simply include the SLF4J Bindings jar along with the Log4j 2 jars to cause all SLF4J logging to be handled by Log4j 2.

Use of the SLF4J bridge (log4j-slf4j-impl-2.0.jar) together with the SLF4J adapter (log4j-to-slf4j-2.0.jar) should never be attempted as it will cause events to endlessly be routed between SLF4J and Log4j 2.