mirror of https://github.com/apache/activemq.git
[AMQ-7301] Improve logging when initialize Stomp NIO SSL connection
This commit is contained in:
parent
c0e7949468
commit
b60efeaad8
|
@ -241,8 +241,11 @@ public class TransportConnector implements Connector, BrokerServiceAware {
|
|||
if (brokerService != null && brokerService.isStopping()) {
|
||||
LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error.getLocalizedMessage());
|
||||
} else {
|
||||
LOG.warn("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error.getLocalizedMessage());
|
||||
LOG.debug("Could not accept connection from {}: {}", remoteHost, error.getMessage());
|
||||
LOG.debug("Reason: " + error.getMessage(), error);
|
||||
if (error != null && error.getMessage() != null && remoteHost != null) {
|
||||
LOG.warn("Could not accept connection from {}: {}", remoteHost, error.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.security.cert.X509Certificate;
|
|||
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLEngine;
|
||||
import javax.net.ssl.SSLHandshakeException;
|
||||
|
||||
import org.apache.activemq.transport.nio.NIOSSLTransport;
|
||||
import org.apache.activemq.wireformat.WireFormat;
|
||||
|
@ -64,7 +65,7 @@ public class StompNIOSSLTransport extends NIOSSLTransport {
|
|||
serviceRead();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOGGER.warn("Could not initialize connection from {}", socket.getInetAddress().getHostAddress(), e);
|
||||
LOGGER.warn("Could not initialize connection from {}: {} ({})", socket.getInetAddress().getHostAddress(), e.getMessage(), e.getCause().getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue