You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/11/03 07:03:33 UTC

svn commit: r710013 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java

Author: davsclaus
Date: Sun Nov  2 22:03:32 2008
New Revision: 710013

URL: http://svn.apache.org/viewvc?rev=710013&view=rev
Log:
Align trace formatter

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java?rev=710013&r1=710012&r2=710013&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java Sun Nov  2 22:03:32 2008
@@ -216,19 +216,15 @@
 
     protected String getNodeMessage(TraceInterceptor interceptor) {
         String message = interceptor.getNode().getShortName() + "(" + interceptor.getNode().getLabel() + ")";
-        return String.format("%1$-25s", message);
+        return String.format("%1$-25.25s", message);
     }
     
     /**
      * Returns the exchange id and node, ordered based on whether this was a trace of
      * an exchange coming out of or into a processing step. For example, 
-     * 
-     * transform(body) -> ID-mojo/39713-1225468755256/2-0
-     * 
-     * Or
-     * 
-     * ID-mojo/39713-1225468755256/2-0 -> transform(body)
-     * 
+     * <br/><tt>transform(body) -> ID-mojo/39713-1225468755256/2-0</tt>
+     * <br/>or
+     * <br/><tt>ID-mojo/39713-1225468755256/2-0 -> transform(body)</tt>
      */
     protected String getExchangeAndNode(TraceInterceptor interceptor, Exchange exchange) {
         String id = "";
@@ -242,12 +238,12 @@
             node = getNodeMessage(interceptor);
         }
         if (interceptor.shouldTraceOutExchanges() && exchange.getOut(false) != null) {
-            result = node.trim() + " -> " + id;
+            result = node.trim() + " -> " + id.trim();
         } else {
-            result = id.trim() + " -> " + node;            
+            result = id.trim() + " -> " + node.trim();
         }
         
         // we want to ensure text coming after this is aligned for readability
-        return String.format("%1$-60s", result);
+        return String.format("%1$-65.65s", result);
     }
 }