LogPage edited by Claus IbsenLog ComponentThe log: component logs message exchanges to the underlying logging mechanism. Camel uses commons-logging which allows you to configure logging via
Refer to the commons-logging user guide for a more complete overview of how to use and configure commons-logging. URI formatlog:loggingCategory[?options] Where loggingCategory is the name of the logging category to use. You can append query options to the URI in the following format, ?option=value&option=value&...
FormattingThe log formats the execution of exchanges to log lines.
Regular logger sampleIn the route below we log the incoming orders at DEBUG level before the order is processed: from("activemq:orders").to("log:com.mycompany.order?level=DEBUG").to("bean:processOrder"); Or using Spring XML to define the route: <route> <from uri="activemq:orders"/> <to uri="log:com.mycompany.order?level=DEBUG"/> <to uri="bean:processOrder"/> </route> Regular logger with formatter sampleIn the route below we log the incoming orders at INFO level before the order is processed. from("activemq:orders"). to("log:com.mycompany.order?showAll=true&multiline=true").to("bean:processOrder"); Throughput logger sampleIn the route below we log the throughput of the incoming orders at DEBUG level grouped by 10 messages. from("activemq:orders"). to("log:com.mycompany.order?level=DEBUG?groupSize=10").to("bean:processOrder"); See Also
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence
- [CONF] Apache Camel > Log confluence