[AMQ-7301] Don't display stack trace on connection error, just the cause

This commit is contained in:
Jean-Baptiste Onofré 2019-11-12 15:18:18 +01:00
parent 6675ddfe28
commit 8212b69fa9

View File

@ -240,10 +240,10 @@ public class TransportConnector implements Connector, BrokerServiceAware {
private void onAcceptError(Exception error, String remoteHost) {
if (brokerService != null && brokerService.isStopping()) {
LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error);
LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error.getLocalizedMessage());
} else {
LOG.error("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error);
LOG.debug("Reason: " + error, error);
LOG.warn("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error.getLocalizedMessage());
LOG.debug("Reason: " + error.getMessage(), error);
}
}
});