ARTEMIS-4921 include protocol name in disconnection log message
This commit is contained in:
parent
ac5713be81
commit
fea2be6a3a
|
@ -133,8 +133,8 @@ public interface ActiveMQClientLogger {
|
|||
@LogMessage(id = 212036, value = "Can not find packet to clear: {} last received command id first stored command id {}", level = LogMessage.Level.WARN)
|
||||
void cannotFindPacketToClear(Integer lastReceivedCommandID, Integer firstStoredCommandID);
|
||||
|
||||
@LogMessage(id = 212037, value = "Connection failure to {} has been detected: {} [code={}]", level = LogMessage.Level.WARN)
|
||||
void connectionFailureDetected(String remoteAddress, String message, ActiveMQExceptionType type);
|
||||
@LogMessage(id = 212037, value = "{} connection failure to {} has been detected: {} [code={}]", level = LogMessage.Level.WARN)
|
||||
void connectionFailureDetected(String protocol, String remoteAddress, String message, ActiveMQExceptionType type);
|
||||
|
||||
@LogMessage(id = 212038, value = "Failure in calling interceptor: {}", level = LogMessage.Level.WARN)
|
||||
void errorCallingInterceptor(Interceptor interceptor, Throwable e);
|
||||
|
|
|
@ -200,7 +200,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
|
|||
}
|
||||
|
||||
if (!(me instanceof ActiveMQRemoteDisconnectException) && !(me instanceof ActiveMQRoutingException) && !(me instanceof ActiveMQDisconnectedException)) {
|
||||
ActiveMQClientLogger.LOGGER.connectionFailureDetected(transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
|
||||
ActiveMQClientLogger.LOGGER.connectionFailureDetected(transportConnection.getProtocolConnection().getProtocolName(), transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
|
||||
} else if (me instanceof ActiveMQDisconnectedException) {
|
||||
ActiveMQClientLogger.LOGGER.connectionClosureDetected(transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class ActiveMQProtonRemotingConnection extends AbstractRemotingConnection
|
|||
try {
|
||||
if (amqpConnection.getHandler().getConnection().getRemoteState() != EndpointState.CLOSED) {
|
||||
// A remote close was received on the client, on that case it's just a normal operation and we don't need to log this.
|
||||
ActiveMQClientLogger.LOGGER.connectionFailureDetected(amqpConnection.getConnectionCallback().getTransportConnection().getRemoteAddress(), me.getMessage(), me.getType());
|
||||
ActiveMQClientLogger.LOGGER.connectionFailureDetected(amqpConnection.getConnectionCallback().getTransportConnection().getProtocolConnection().getProtocolName(), amqpConnection.getConnectionCallback().getTransportConnection().getRemoteAddress(), me.getMessage(), me.getType());
|
||||
}
|
||||
} catch (Throwable e) { // avoiding NPEs from te logging statement. I don't think this would happen, but just in case
|
||||
logger.warn(e.getMessage(), e);
|
||||
|
|
|
@ -783,7 +783,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
if (me != null) {
|
||||
//filter it like the other protocols
|
||||
if (!(me instanceof ActiveMQRemoteDisconnectException)) {
|
||||
ActiveMQClientLogger.LOGGER.connectionFailureDetected(this.transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
|
||||
ActiveMQClientLogger.LOGGER.connectionFailureDetected(this.transportConnection.getProtocolConnection().getProtocolName(), this.transportConnection.getRemoteAddress(), me.getMessage(), me.getType());
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue