Logging meaningful steps within your route
Camel includes a Log EIP that is intended for logging interesting milestones within your integration routes. This is different from logging an error (see the Logging errors recipe in Chapter 7, Error Handling and Compensation) or logging most of the contents of the exchange (see the Debugging using logging recipe). This Log pattern gives you the ability to log a message intended for a human being in order to indicate that something meaningful has occurred within your route. This can include a message being routed a specific way, or that the message contains a value of particular interest.
This recipe will show you how to include explicit steps within your route to externally log significant milestones and data from your integrations.
Getting ready
The Java code for this recipe is located in the org.camelcookbook.monitoring.logeip
package. The Spring XML files are located under src/main/resources/META-INF/spring
and prefixed with logeip
.