Interface LogListener


public interface LogListener
An event listener SPI for logging. Listeners are registered into org.apache.camel.processor.LogProcessor and org.apache.camel.processor.CamelLogProcessor so that the logging events are delivered for both of Log Component and Log EIP.
  • Method Summary

    Modifier and Type
    Method
    Description
    onLog(Exchange exchange, CamelLogger camelLogger, String message)
    Invoked right before Log component or Log EIP logs.
  • Method Details

    • onLog

      String onLog(Exchange exchange, CamelLogger camelLogger, String message)
      Invoked right before Log component or Log EIP logs. Note that CamelLogger holds the LoggingLevel and Marker. The listener can check CamelLogger.getLevel() to see in which log level this is going to be logged.
      Parameters:
      exchange - camel exchange
      camelLogger - CamelLogger
      message - log message
      Returns:
      log message, possibly enriched by the listener