Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
How do I set the max chars when debug logging messages in CamelAvailable as of Camel 2.0 When you run Camel with logging, it will log the messages and its content from time to time. You will see this in the log as: DEBUG ProducerCache - >>>> Endpoint[direct:start] Exchange[Message: 01234567890123456789... [Body clipped after 20 chars, total length is 1000]] Here we have a big message that just contains many numbers. As its based on an unit test we have set a custom limit of 20 chars, and we have a payload with 1000 chars in total. You can customize the limit when Camel clips the body in the log. From Camel 2.12 onwards, setting a negative value, such as -1, means the message body is not logged. For earlier Camel versions, you would need to set the value to 1, and have the first char logged. Customizing from Java DSLYou add to the Camel properties the limit. For example to limit at 500 chars: context.getProperties().put(Exchange.LOG_DEBUG_BODY_MAX_CHARS, "500"); Customizing from Spring DSLYou add to the Camel properties the limit. For example to limit at 500 chars: <camelContext> <properties> <property key="CamelLogDebugBodyMaxChars" value="500"/> </properties> </camelContext> |