Use Log4jBridgeHandler to route JUL-based logging into Log4j 2
Since version 2.15.0 `log4j-jul` contains a `Log4jBridgeHandler`,
that forwards JUL to Log4j 2.x and synchronizes the logger levels of
the two frameworks.
This commmit adds support for the `Log4jBridgeHandler` and sets it as
the bridge handler for the Log4j 2.x stack, replacing the existing
JUL to SLF4J bridge that was used previously.
See gh-30003
pull/30890/head
Piotr P. Karwasz4 years agocommitted byAndy Wilkinson
@ -75,6 +77,10 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@@ -75,6 +77,10 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@ -155,10 +161,51 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@@ -155,10 +161,51 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@ -366,6 +413,9 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@@ -366,6 +413,9 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {