diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java index e8fdc08054..6156c15877 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java @@ -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) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java index 00bd70414f..065277ac27 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java @@ -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 { diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java index a06765d91e..56920796dd 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java @@ -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 diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java index b1f63fea8d..0b94ab2130 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java @@ -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 {