File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed
broker/src/main/java/org/apache/rocketmq/broker
src/main/java/org/apache/rocketmq/namesrv
proxy/src/main/java/org/apache/rocketmq/proxy Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 3737import org .apache .rocketmq .logging .org .slf4j .Logger ;
3838import org .apache .rocketmq .logging .org .slf4j .LoggerFactory ;
3939import org .apache .rocketmq .remoting .netty .NettyClientConfig ;
40+ import org .slf4j .bridge .SLF4JBridgeHandler ;
4041import org .apache .rocketmq .remoting .netty .NettyServerConfig ;
4142import org .apache .rocketmq .remoting .protocol .RemotingCommand ;
4243import org .apache .rocketmq .srvutil .ServerUtil ;
@@ -49,6 +50,10 @@ public class BrokerStartup {
4950 public static final SystemConfigFileHelper CONFIG_FILE_HELPER = new SystemConfigFileHelper ();
5051
5152 public static void main (String [] args ) {
53+ // Bridge java.util.logging to SLF4J
54+ SLF4JBridgeHandler .removeHandlersForRootLogger ();
55+ SLF4JBridgeHandler .install ();
56+
5257 start (createBrokerController (args ));
5358 }
5459
Original file line number Diff line number Diff line change 4848 <groupId >${project.groupId} </groupId >
4949 <artifactId >rocketmq-srvutil</artifactId >
5050 </dependency >
51+ <dependency >
52+ <groupId >org.slf4j</groupId >
53+ <artifactId >jul-to-slf4j</artifactId >
54+ </dependency >
5155 <dependency >
5256 <groupId >org.openjdk.jmh</groupId >
5357 <artifactId >jmh-core</artifactId >
Original file line number Diff line number Diff line change 4040import org .apache .rocketmq .logging .org .slf4j .LoggerFactory ;
4141import org .apache .rocketmq .srvutil .ServerUtil ;
4242import org .apache .rocketmq .srvutil .ShutdownHookThread ;
43+ import org .slf4j .bridge .SLF4JBridgeHandler ;
4344
4445public class NamesrvStartup {
4546
@@ -52,6 +53,10 @@ public class NamesrvStartup {
5253 private static ControllerConfig controllerConfig = null ;
5354
5455 public static void main (String [] args ) {
56+ // Bridge java.util.logging to SLF4J
57+ SLF4JBridgeHandler .removeHandlersForRootLogger ();
58+ SLF4JBridgeHandler .install ();
59+
5560 main0 (args );
5661 controllerManagerMain ();
5762 }
Original file line number Diff line number Diff line change 4747import org .apache .rocketmq .proxy .service .cert .TlsCertificateManager ;
4848import org .apache .rocketmq .remoting .protocol .RemotingCommand ;
4949import org .apache .rocketmq .srvutil .ServerUtil ;
50+ import org .slf4j .bridge .SLF4JBridgeHandler ;
5051
5152import java .util .Date ;
5253import java .util .List ;
@@ -65,6 +66,10 @@ public void appendStartAndShutdown(StartAndShutdown startAndShutdown) {
6566 }
6667
6768 public static void main (String [] args ) {
69+ // Bridge java.util.logging to SLF4J
70+ SLF4JBridgeHandler .removeHandlersForRootLogger ();
71+ SLF4JBridgeHandler .install ();
72+
6873 try {
6974 // parse argument from command line
7075 CommandLineArgument commandLineArgument = parseCommandLineArgument (args );
You can’t perform that action at this time.
0 commit comments