Debugging using logging

Camel includes a Log Component that is useful for debug logging in that it makes it easy to log most, or all of the contents of the messages flowing through your routes. Typically this component is only used temporarily within your routes to help you debug, and is expected to be removed before deployment. The Enabling step-by-step tracing in code recipe will cover how you can enable a similar level of logging at runtime. To log significant events within your routes, see the Log EIP (the Logging meaningful steps within your route recipe).

This recipe will show you how to use the Log Component to help debug your integrations.

Getting ready

The Java code for this recipe is located in the org.camelcookbook.monitoring.log package. ...

Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.