ShannonDing commented on a change in pull request #1313: add missing log
URL: https://github.com/apache/rocketmq/pull/1313#discussion_r302447372
##########
File path: broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
##########
@@ -71,10 +71,9 @@ public static BrokerController start(BrokerController
controller) {
}
log.info(tip);
- System.out.printf("%s%n", tip);
return controller;
} catch (Throwable e) {
- e.printStackTrace();
+ log.error("BrokerStartup fail to boot.", e);
Review comment:
IMO, you can print the stack trace to the error log, BUT, it is better to
keep the standard output to show the start error directly to the users, in this
case, the users can find the error as soon as possible and deal with the error
instead of monitor the log file.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services