camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1053866 - /camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultProducer.java
Date Thu, 30 Dec 2010 12:19:03 GMT
Author: davsclaus
Date: Thu Dec 30 12:19:02 2010
New Revision: 1053866

URL: http://svn.apache.org/viewvc?rev=1053866&view=rev
Log:
Polished

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultProducer.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultProducer.java?rev=1053866&r1=1053865&r2=1053866&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultProducer.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultProducer.java Thu Dec
30 12:19:02 2010
@@ -62,14 +62,28 @@ public abstract class DefaultProducer ex
     }
 
     protected void doStart() throws Exception {
-        if (log.isDebugEnabled()) {
-            log.debug("Starting producer: " + this);
+        // log at debug level for singletons, for prototype scoped log at trace level to
not spam logs
+        if (isSingleton()) {
+            if (log.isDebugEnabled()) {
+                log.debug("Starting producer: " + this);
+            }
+        } else {
+            if (log.isTraceEnabled()) {
+                log.trace("Starting producer: " + this);
+            }
         }
     }
 
     protected void doStop() throws Exception {
-        if (log.isDebugEnabled()) {
-            log.debug("Stopping producer: " + this);
+        // log at debug level for singletons, for prototype scoped log at trace level to
not spam logs
+        if (isSingleton()) {
+            if (log.isDebugEnabled()) {
+                log.debug("Stopping producer: " + this);
+            }
+        } else {
+            if (log.isTraceEnabled()) {
+                log.trace("Stopping producer: " + this);
+            }
         }
     }
 }



Mime
View raw message