diff --git a/common/src/main/java/org/apache/rocketmq/common/constant/LoggerName.java b/common/src/main/java/org/apache/rocketmq/common/constant/LoggerName.java
index 12070ddc34ee8076cc22c3e92afa65641833441e..fe0ae9f17137fd22a13f80d18cfddd0497b0601a 100644
--- a/common/src/main/java/org/apache/rocketmq/common/constant/LoggerName.java
+++ b/common/src/main/java/org/apache/rocketmq/common/constant/LoggerName.java
@@ -19,6 +19,7 @@ package org.apache.rocketmq.common.constant;
public class LoggerName {
public static final String FILTERSRV_LOGGER_NAME = "RocketmqFiltersrv";
public static final String NAMESRV_LOGGER_NAME = "RocketmqNamesrv";
+ public static final String NAMESRV_CONSOLE_NAME = "RocketmqNamesrvConsole";
public static final String BROKER_LOGGER_NAME = "RocketmqBroker";
public static final String BROKER_CONSOLE_NAME = "RocketmqConsole";
public static final String CLIENT_LOGGER_NAME = "RocketmqClient";
diff --git a/distribution/conf/logback_namesrv.xml b/distribution/conf/logback_namesrv.xml
index 53288945be87dc618924ec89128b80743f3720bd..36eda6801b4edb0208f2a7e1ff2adf7221d5711c 100644
--- a/distribution/conf/logback_namesrv.xml
+++ b/distribution/conf/logback_namesrv.xml
@@ -82,6 +82,11 @@
+
+
+
+
+
diff --git a/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java b/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java
index 24e7c263d4521d2196581cab6c0e197b7d5552bc..9b49567f3223e14be6ffd67b5cc18bc928c48a83 100644
--- a/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java
+++ b/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java
@@ -99,8 +99,9 @@ public class NamesrvStartup {
}
if (commandLine.hasOption('p')) {
- MixAll.printObjectProperties(null, namesrvConfig);
- MixAll.printObjectProperties(null, nettyServerConfig);
+ InternalLogger console = InternalLoggerFactory.getLogger(LoggerName.NAMESRV_CONSOLE_NAME);
+ MixAll.printObjectProperties(console, namesrvConfig);
+ MixAll.printObjectProperties(console, nettyServerConfig);
System.exit(0);
}