Package org.apache.camel.spi
Interface LogListener
public interface LogListener
An event listener SPI for logging. Listeners are registered into
and
so that the logging events are delivered for both of Log
Component and Log EIP.
invalid reference
org.apache.camel.processor.LogProcessor
invalid reference
org.apache.camel.processor.CamelLogProcessor
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidafterLog(Exchange exchange, CamelLogger camelLogger, String message) Invoked right after Log component or Log EIP logs.onLog(Exchange exchange, CamelLogger camelLogger, String message) Invoked right before Log component or Log EIP logs.
-
Method Details
-
onLog
Invoked right before Log component or Log EIP logs. Note thatCamelLoggerholds theLoggingLevelandMarker. The listener can checkCamelLogger.getLevel()to see in which log level this is going to be logged.- Parameters:
exchange- camel exchangecamelLogger-CamelLoggermessage- log message- Returns:
- log message, possibly enriched by the listener
-
afterLog
Invoked right after Log component or Log EIP logs. The method can be used for cleaning up any transient information used during onLog execution.- Parameters:
exchange- camel exchangecamelLogger-CamelLoggermessage- log message
-