@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); }
@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); }
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); }