Пример #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);
 }