Пример #1
0
 @Override
 public org.apache.activemq.broker.region.Destination addDestination(
     ConnectionContext context, ActiveMQDestination destination, boolean create) throws Exception {
   if (isLogAll() || isLogInternalEvents()) {
     LOG.info(
         "Adding destination: {}:{}",
         destination.getDestinationTypeAsString(),
         destination.getPhysicalName());
   }
   return super.addDestination(context, destination, create);
 }
Пример #2
0
 @Override
 public void removeDestination(
     ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
   if (isLogAll() || isLogInternalEvents()) {
     LOG.info(
         "Removing destination: {}:{}",
         destination.getDestinationTypeAsString(),
         destination.getPhysicalName());
   }
   super.removeDestination(context, destination, timeout);
 }
Пример #3
0
 private void logSend(Message copy) {
   Logger perDestinationsLogger = LOG;
   if (isPerDestinationLogger()) {
     ActiveMQDestination destination = copy.getDestination();
     perDestinationsLogger =
         LoggerFactory.getLogger(
             LOG.getName()
                 + "."
                 + destination.getDestinationTypeAsString()
                 + "."
                 + destination.getPhysicalName());
   }
   perDestinationsLogger.info("Sending message: {}", copy);
 }
Пример #4
0
 @Override
 public Set<ActiveMQDestination> getDurableDestinations() {
   Set<ActiveMQDestination> result = super.getDurableDestinations();
   if (isLogAll() || isLogInternalEvents()) {
     if (result == null) {
       LOG.info("Get Durable Destinations returned empty list.");
     } else {
       StringBuffer destinations = new StringBuffer();
       for (ActiveMQDestination dest : result) {
         destinations.append(destinations.length() > 0 ? ", " : "");
         destinations.append(dest.getPhysicalName());
       }
       LOG.info("Get Durable Destinations: {}", destinations);
     }
   }
   return result;
 }