Author: davsclaus
Date: Wed Jun 25 22:28:36 2008
New Revision: 671765

URL: http://svn.apache.org/viewvc?rev=671765&view=rev
Log:
CAMEL-619: Fixed tracer not outputting node ids. Added unit test for tracer. 
Breadcrum is outputtet to be used for correlation for poor end users looking 
into the log files

Modified:
    
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DebugInterceptorTest.java
    
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java

Modified: 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DebugInterceptorTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DebugInterceptorTest.java?rev=671765&r1=671764&r2=671765&view=diff
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DebugInterceptorTest.java
 (original)
+++ 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DebugInterceptorTest.java
 Wed Jun 25 22:28:36 2008
@@ -27,6 +27,7 @@
  */
 public class DebugInterceptorTest extends ContextTestSupport {
 
+    // START SNIPPET: e1
     public void testSendingSomeMessages() throws Exception {
         template.sendBodyAndHeader("direct:start", "Hello London", "to", 
"James");
         template.sendBodyAndHeader("direct:start", "This is Copenhagen 
calling", "from", "Claus");
@@ -35,6 +36,9 @@
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
+                // add debugger as an interceptor. The debugger is an enhanced 
tracer that also
+                // logs the exchanges at runtime. It is also a framework where 
we programatically
+                // can access the internal states of Camel etc.
                 getContext().addInterceptStrategy(new Debugger());
 
                 from("direct:start").
@@ -53,5 +57,6 @@
             }
         };
     }
+    // END SNIPPET: e1
 
 }
\ No newline at end of file

Modified: 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java?rev=671765&r1=671764&r2=671765&view=diff
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
 (original)
+++ 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
 Wed Jun 25 22:28:36 2008
@@ -28,6 +28,7 @@
  */
 public class TraceInterceptorTest extends ContextTestSupport {
 
+    // START SNIPPET: e1
     public void testSendingSomeMessages() throws Exception {
         template.sendBodyAndHeader("direct:start", "Hello London", "to", 
"James");
         template.sendBodyAndHeader("direct:start", "This is Copenhagen 
calling", "from", "Claus");
@@ -36,6 +37,8 @@
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
+                // add tracer as an interceptor so it will log the exchange 
executions at runtime
+                // this can aid us to understand/see how the exchanges is 
routed etc.
                 getContext().addInterceptStrategy(new Tracer());
 
                 from("direct:start").
@@ -54,5 +57,6 @@
             }
         };
     }
-    
+    // END SNIPPET: e1
+
 }


Reply via email to