activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1152757 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker: TransactionBroker.java region/Queue.java region/RegionBroker.java region/TempQueue.java region/TempTopic.java region/TopicRegion.java
Date Mon, 01 Aug 2011 13:14:59 GMT
Author: dejanb
Date: Mon Aug  1 13:14:55 2011
New Revision: 1152757

URL: http://svn.apache.org/viewvc?rev=1152757&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3431 - guard debug logging

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java?rev=1152757&r1=1152756&r2=1152757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
Mon Aug  1 13:14:55 2011
@@ -108,7 +108,9 @@ public class TransactionBroker extends B
                         }
                         transaction.setState(Transaction.PREPARED_STATE);
                         registerMBean(transaction);
-                        LOG.debug("recovered prepared transaction: " + transaction.getTransactionId());
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("recovered prepared transaction: " + transaction.getTransactionId());
+                        }
                     } catch (Throwable e) {
                         throw new WrappedException(e);
                     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=1152757&r1=1152756&r2=1152757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Mon Aug  1 13:14:55 2011
@@ -475,7 +475,9 @@ public class Queue extends BaseDestinati
                         if (ref.getMessageId().getBrokerSequenceId() == lastDeiveredSequenceId)
{
                             lastDeliveredRef = ref;
                             markAsRedelivered = true;
-                            LOG.debug("found lastDeliveredSeqID: " + lastDeiveredSequenceId
+ ", message reference: " + ref.getMessageId());
+                            if (LOG.isDebugEnabled()) {
+                                LOG.debug("found lastDeliveredSeqID: " + lastDeiveredSequenceId
+ ", message reference: " + ref.getMessageId());
+                            }
                             break;
                         }
                     }
@@ -984,7 +986,9 @@ public class Queue extends BaseDestinati
                 for (MessageReference ref : toExpire) {
                     pagedInPendingDispatch.remove(ref);
                     if (broker.isExpired(ref)) {
-                        LOG.debug("expiring from pagedInPending: " + ref);
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("expiring from pagedInPending: " + ref);
+                        }
                         messageExpired(connectionContext, ref);
                     }
                 }
@@ -1000,7 +1004,9 @@ public class Queue extends BaseDestinati
             }
             for (MessageReference ref : toExpire) {
                 if (broker.isExpired(ref)) {
-                    LOG.debug("expiring from pagedInMessages: " + ref);
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("expiring from pagedInMessages: " + ref);
+                    }
                     messageExpired(connectionContext, ref);
                 } else {
                     pagedInMessagesLock.writeLock().lock();
@@ -1021,7 +1027,9 @@ public class Queue extends BaseDestinati
                             MessageReference node = messages.next();
                             if (node.isExpired()) {
                                 if (broker.isExpired(node)) {
-                                    LOG.debug("expiring from messages: " + node);
+                                    if (LOG.isDebugEnabled()) {
+                                        LOG.debug("expiring from messages: " + node);
+                                    }
                                     messageExpired(connectionContext, createMessageReference(node.getMessage()));
                                 }
                                 messages.remove();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?rev=1152757&r1=1152756&r2=1152757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Mon Aug  1 13:14:55 2011
@@ -669,7 +669,9 @@ public class RegionBroker extends EmptyB
             brokerInfos.put(info.getBrokerId(), existing);
         }
         existing.incrementRefCount();
-        LOG.debug(getBrokerName() + " addBroker:" + info.getBrokerName() + " brokerInfo size
: " + brokerInfos.size());
+        if (LOG.isDebugEnabled()) {
+            LOG.debug(getBrokerName() + " addBroker:" + info.getBrokerName() + " brokerInfo
size : " + brokerInfos.size());
+        }
         addBrokerInClusterUpdate();
     }
 
@@ -680,7 +682,9 @@ public class RegionBroker extends EmptyB
             if (existing != null && existing.decrementRefCount() == 0) {
                brokerInfos.remove(info.getBrokerId());
             }
-            LOG.debug(getBrokerName() + " removeBroker:" + info.getBrokerName() + " brokerInfo
size : " + brokerInfos.size());
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(getBrokerName() + " removeBroker:" + info.getBrokerName() + " brokerInfo
size : " + brokerInfos.size());
+            }
             removeBrokerInClusterUpdate();
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java?rev=1152757&r1=1152756&r2=1152757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java
Mon Aug  1 13:14:55 2011
@@ -76,7 +76,9 @@ public class TempQueue extends Queue{
                                         .getConnectionId()))) {
 
             tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId());
-            LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
+            }
         }
         super.addSubscription(context, sub);
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java?rev=1152757&r1=1152756&r2=1152757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java
Mon Aug  1 13:14:55 2011
@@ -61,7 +61,9 @@ public class TempTopic  extends Topic  i
                                         .getConnectionId()))) {
 
             tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId());
-            LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
+            if (LOG.isDebugEnabled()) {
+                LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
+            }
         }
         super.addSubscription(context, sub);
     } 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java?rev=1152757&r1=1152756&r2=1152757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java
Mon Aug  1 13:14:55 2011
@@ -214,7 +214,9 @@ public class TopicRegion extends Abstrac
             for (int i = 0; i < infos.length; i++) {
 
                 SubscriptionInfo info = infos[i];
-                LOG.debug("Restoring durable subscription: " + info);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Restoring durable subscription: " + info);
+                }
                 SubscriptionKey key = new SubscriptionKey(info);
 
                 // A single durable sub may be subscribing to multiple topics.



Mime
View raw message