[ISSUE #7425] Add RoccketmqControllerConsole log to fix bug (#7458)

This commit is contained in:
Lei Sun
2023-10-13 13:42:27 +08:00
committed by GitHub
parent 5d492c3382
commit 28427d4012
3 changed files with 9 additions and 3 deletions
@@ -21,6 +21,7 @@ public class LoggerName {
public static final String NAMESRV_LOGGER_NAME = "RocketmqNamesrv";
public static final String NAMESRV_CONSOLE_LOGGER_NAME = "RocketmqNamesrvConsole";
public static final String CONTROLLER_LOGGER_NAME = "RocketmqController";
public static final String CONTROLLER_CONSOLE_NAME = "RocketmqControllerConsole";
public static final String NAMESRV_WATER_MARK_LOGGER_NAME = "RocketmqNamesrvWaterMark";
public static final String BROKER_LOGGER_NAME = "RocketmqBroker";
public static final String BROKER_CONSOLE_NAME = "RocketmqConsole";
@@ -94,9 +94,10 @@ public class ControllerStartup {
}
if (commandLine.hasOption('p')) {
MixAll.printObjectProperties(null, controllerConfig);
MixAll.printObjectProperties(null, nettyServerConfig);
MixAll.printObjectProperties(null, nettyClientConfig);
Logger console = LoggerFactory.getLogger(LoggerName.CONTROLLER_CONSOLE_NAME);
MixAll.printObjectProperties(console, controllerConfig);
MixAll.printObjectProperties(console, nettyServerConfig);
MixAll.printObjectProperties(console, nettyClientConfig);
System.exit(0);
}
@@ -116,6 +116,10 @@
<appender-ref ref="RocketmqControllerAppender"/>
</logger>
<logger name="RocketmqControllerConsole" additivity="false" level="INFO">
<appender-ref ref="STDOUT"/>
</logger>
<logger name="RocketmqCommon" additivity="false" level="INFO">
<appender-ref ref="RocketmqControllerAppender"/>
</logger>