Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.rocketmq.logging.org.slf4j.Logger;
import org.apache.rocketmq.logging.org.slf4j.LoggerFactory;
import org.apache.rocketmq.remoting.netty.NettyClientConfig;
import org.slf4j.bridge.SLF4JBridgeHandler;
import org.apache.rocketmq.remoting.netty.NettyServerConfig;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
import org.apache.rocketmq.srvutil.ServerUtil;
Expand All @@ -49,6 +50,10 @@ public class BrokerStartup {
public static final SystemConfigFileHelper CONFIG_FILE_HELPER = new SystemConfigFileHelper();

public static void main(String[] args) {
// Bridge java.util.logging to SLF4J
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();

start(createBrokerController(args));
}

Expand Down
4 changes: 4 additions & 0 deletions namesrv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<groupId>${project.groupId}</groupId>
<artifactId>rocketmq-srvutil</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.rocketmq.logging.org.slf4j.LoggerFactory;
import org.apache.rocketmq.srvutil.ServerUtil;
import org.apache.rocketmq.srvutil.ShutdownHookThread;
import org.slf4j.bridge.SLF4JBridgeHandler;

public class NamesrvStartup {

Expand All @@ -52,6 +53,10 @@ public class NamesrvStartup {
private static ControllerConfig controllerConfig = null;

public static void main(String[] args) {
// Bridge java.util.logging to SLF4J
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();

main0(args);
controllerManagerMain();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.apache.rocketmq.proxy.service.cert.TlsCertificateManager;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
import org.apache.rocketmq.srvutil.ServerUtil;
import org.slf4j.bridge.SLF4JBridgeHandler;

import java.util.Date;
import java.util.List;
Expand All @@ -65,6 +66,10 @@ public void appendStartAndShutdown(StartAndShutdown startAndShutdown) {
}

public static void main(String[] args) {
// Bridge java.util.logging to SLF4J
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();

try {
// parse argument from command line
CommandLineArgument commandLineArgument = parseCommandLineArgument(args);
Expand Down
Loading