ARTEMIS-2063 improve logging for address/queue deployment

This commit is contained in:
Justin Bertram 2018-08-29 14:29:10 -05:00
parent 218e3a97fe
commit 3af9ca057f
2 changed files with 8 additions and 3 deletions

View File

@ -94,8 +94,8 @@ public interface ActiveMQServerLogger extends BasicLogger {
void serverStopped(String version, SimpleString nodeId, String uptime);
@LogMessage(level = Logger.Level.INFO)
@Message(id = 221003, value = "Deploying queue {0} on address {1}", format = Message.Format.MESSAGE_FORMAT)
void deployQueue(String queueName, String addressName);
@Message(id = 221003, value = "Deploying {2} queue {0} on address {1}", format = Message.Format.MESSAGE_FORMAT)
void deployQueue(String queueName, String addressName, String routingType);
@LogMessage(level = Logger.Level.INFO)
@Message(id = 221004, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
@ -426,6 +426,10 @@ public interface ActiveMQServerLogger extends BasicLogger {
@Message(id = 221079, value = "Ignoring prepare on xid as already called : {0}", format = Message.Format.MESSAGE_FORMAT)
void ignoringPrepareOnXidAlreadyCalled(String xid);
@LogMessage(level = Logger.Level.INFO)
@Message(id = 221080, value = "Deploying address {0} supporting {1}", format = Message.Format.MESSAGE_FORMAT)
void deployAddress(String addressName, String routingTypes);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222000, value = "ActiveMQServer is being finalized and has not been stopped. Please remember to stop the server before letting it go out of scope",
format = Message.Format.MESSAGE_FORMAT)

View File

@ -2744,6 +2744,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
for (CoreAddressConfiguration config : configuration.getAddressConfigurations()) {
AddressInfo info = new AddressInfo(SimpleString.toSimpleString(config.getName()), config.getRoutingTypes());
addOrUpdateAddressInfo(info);
ActiveMQServerLogger.LOGGER.deployAddress(config.getName(), config.getRoutingTypes().toString());
deployQueuesFromListCoreQueueConfiguration(config.getQueueConfigurations());
}
}
@ -2751,7 +2752,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
private void deployQueuesFromListCoreQueueConfiguration(List<CoreQueueConfiguration> queues) throws Exception {
for (CoreQueueConfiguration config : queues) {
SimpleString queueName = SimpleString.toSimpleString(config.getName());
ActiveMQServerLogger.LOGGER.deployQueue(config.getName(), config.getAddress());
ActiveMQServerLogger.LOGGER.deployQueue(config.getName(), config.getAddress(), config.getRoutingType().toString());
AddressSettings as = addressSettingsRepository.getMatch(config.getAddress());
// determine if there is an address::queue match; update it if so
int maxConsumers = config.getMaxConsumers() == null ? as.getDefaultMaxConsumers() : config.getMaxConsumers();