[ARTEMIS-1225] Log messages without prefixed id code in artemis-ra

This commit is contained in:
Dmitrii Tikhomirov 2017-06-11 22:40:54 +02:00 committed by Justin Bertram
parent 67efdc34ae
commit d3010682a4
4 changed files with 15 additions and 3 deletions

View File

@ -77,6 +77,10 @@ public interface ActiveMQRALogger extends BasicLogger {
@Message(id = 151006, value = "Cluster topology change detected. Re-balancing connections on even {0}.", format = Message.Format.MESSAGE_FORMAT)
void rebalancingConnections(String event);
@LogMessage(level = Logger.Level.INFO)
@Message(id = 151007, value = "Resource adaptor started", format = Message.Format.MESSAGE_FORMAT)
void resourceAdaptorStarted();
@LogMessage(level = Logger.Level.WARN)
@Message(id = 152001, value = "problem resetting xa session after failure", format = Message.Format.MESSAGE_FORMAT)
void problemResettingXASession(@Cause Throwable t);
@ -113,6 +117,14 @@ public interface ActiveMQRALogger extends BasicLogger {
@Message(id = 152009, value = "Unable to validate properties", format = Message.Format.MESSAGE_FORMAT)
void unableToValidateProperties(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 152010, value = "Unable to clear the transaction", format = Message.Format.MESSAGE_FORMAT)
void unableToClearTheTransaction(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 152011, value = "Unable to close the factory", format = Message.Format.MESSAGE_FORMAT)
void unableToCloseFactory(@Cause Throwable e);
@LogMessage(level = Logger.Level.ERROR)
@Message(id = 154000, value = "Error while creating object Reference.", format = Message.Format.MESSAGE_FORMAT)
void errorCreatingReference(@Cause Exception e);

View File

@ -251,7 +251,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
}
}
ActiveMQRALogger.LOGGER.info("Resource adaptor started");
ActiveMQRALogger.LOGGER.resourceAdaptorStarted();
}
/**

View File

@ -421,7 +421,7 @@ public class ActiveMQActivation {
// closing the factory will help making sure pending threads are closed
factory.close();
} catch (Throwable e) {
ActiveMQRALogger.LOGGER.warn(e);
ActiveMQRALogger.LOGGER.unableToCloseFactory(e);
}
factory = null;

View File

@ -342,7 +342,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
tx.setRollbackOnly();
}
} catch (Exception e1) {
ActiveMQRALogger.LOGGER.warn("unable to clear the transaction", e1);
ActiveMQRALogger.LOGGER.unableToClearTheTransaction(e1);
}
}