Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROCKETMQ-42] Output is not friendly, when Main failed. #35

Closed
wants to merge 8 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static BrokerController start(BrokerController controller) {
log.info(tip);
return controller;
} catch (Throwable e) {
System.out.printf("Broker startup failure with following exceptions:");
e.printStackTrace();
System.exit(-1);
}
Expand Down Expand Up @@ -176,6 +177,7 @@ public static BrokerController createBrokerController(String[] args) {
}

messageStoreConfig.setHaListenPort(nettyServerConfig.getListenPort() + 1);

LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(lc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public void run() {

return controller;
} catch (Throwable e) {
System.out.printf("Filtersrv startup failure with following exceptions:");
e.printStackTrace();
System.exit(-1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ public void run() {
System.out.printf(tip + "%n");

return controller;
} catch (Throwable e) {
}
catch (Throwable e) {
System.out.printf("Namesrv startup failure with following exceptions:");
e.printStackTrace();
System.exit(-1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static void main0(String[] args, RPCHook rpcHook) {
break;
}
} catch (Exception e) {
System.out.printf("MQAdmin startup failure with following exceptions:");
e.printStackTrace();
}
}
Expand Down