Log has been edited by Claus Ibsen (May 31, 2009). Content:Log ComponentThe log: component logs message exchanges to the underlying logging mechanism. Camel uses commons-logging
Refer to the commons-logging user guide URI formatlog:loggingCategory[?level=loggingLevel][options]
FormattingThe log formats the execution of exchanges to log lines. LogFormatter has the following options:
Regular logger sampleIn the route below we logs the incoming orders at DEBUG level before the order is processed. from("activemq:orders").to("log:com.mycompany.order?level=DEBUG").to("bean:processOrder"); And using Spring DSL as 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 logs 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 |
Unsubscribe or edit your notifications preferences