ARTEMIS-2389 add details to conn failure logging

This commit is contained in:
Justin Bertram 2019-06-19 13:18:23 -05:00 committed by Clebert Suconic
parent e2a5f83288
commit 8484c8a43b
4 changed files with 5 additions and 5 deletions

View File

@ -225,8 +225,8 @@ public interface ActiveMQClientLogger extends BasicLogger {
void cannotFindPacketToClear(Integer lastReceivedCommandID, Integer firstStoredCommandID);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212037, value = "Connection failure has been detected: {0} [code={1}]", format = Message.Format.MESSAGE_FORMAT)
void connectionFailureDetected(String message, ActiveMQExceptionType type);
@Message(id = 212037, value = "Connection failure to {0} has been detected: {1} [code={2}]", format = Message.Format.MESSAGE_FORMAT)
void connectionFailureDetected(String remoteAddress, String message, ActiveMQExceptionType type);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212038, value = "Failure in calling interceptor: {0}", format = Message.Format.MESSAGE_FORMAT)

View File

@ -206,7 +206,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
}
if (!(me instanceof ActiveMQRemoteDisconnectException)) {
ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
ActiveMQClientLogger.LOGGER.connectionFailureDetected(transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
}
try {

View File

@ -80,7 +80,7 @@ public class ActiveMQProtonRemotingConnection extends AbstractRemotingConnection
//filter it like the other protocols
if (!(me instanceof ActiveMQRemoteDisconnectException)) {
ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
ActiveMQClientLogger.LOGGER.connectionFailureDetected(amqpConnection.getConnectionCallback().getTransportConnection().getRemoteAddress(), me.getMessage(), me.getType());
}
// Then call the listeners

View File

@ -655,7 +655,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
if (me != null) {
//filter it like the other protocols
if (!(me instanceof ActiveMQRemoteDisconnectException)) {
ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
ActiveMQClientLogger.LOGGER.connectionFailureDetected(this.transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
}
}
try {