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 2009/06/09 10:08:31 UTC
svn commit: r782905 - in /camel/trunk/components/camel-spring/src/test:
java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java
resources/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml
Author: davsclaus
Date: Tue Jun 9 08:08:30 2009
New Revision: 782905
URL: http://svn.apache.org/viewvc?rev=782905&view=rev
Log:
CAMEL-1579: Debug logging of messages now clips body if its too big. Added Camel property to set max length or disabled it by setting it to 0 or -1.
Added:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java (with props)
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml
- copied, changed from r782889, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/endpointReference.xml
Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java?rev=782905&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java Tue Jun 9 08:08:30 2009
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.impl.LogDebugBodyMaxCharsTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringLogDebugBodyMaxCharsTest extends LogDebugBodyMaxCharsTest {
+
+ protected CamelContext createCamelContext() throws Exception {
+ return createSpringCamelContext(this, "org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml");
+ }
+
+}
Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml (from r782889, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/endpointReference.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/endpointReference.xml&r1=782889&r2=782905&rev=782905&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/endpointReference.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/SpringLogDebugBodyMaxCharsTest.xml Tue Jun 9 08:08:30 2009
@@ -22,20 +22,16 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <!-- START SNIPPET: example -->
- <bean id="mybean" class="org.apache.camel.spring.example.DummyBean">
- <property name="endpoint" ref="endpoint1"/>
- </bean>
-
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
- <endpoint id="endpoint1" uri="direct:start"/>
- <endpoint id="endpoint2" uri="mock:end"/>
+ <properties>
+ <property key="CamelLogDebugBodyMaxChars" value="20"/>
+ </properties>
- <route>
- <from ref="endpoint1"/>
- <to uri="ref:endpoint2"/>
- </route>
+ <route>
+ <from uri="direct:start"/>
+ <to uri="log:foo"/>
+ <to uri="mock:result"/>
+ </route>
</camelContext>
- <!-- END SNIPPET: example -->
</beans>