public class CamelLogProcessor extends Object implements AsyncProcessor, IdAware
Processor which just logs to a CamelLogger object which can be used
as an exception handler instead of using a dead letter queue.
The name CamelLogger has been chosen to avoid any name clash with log kits
which has a Logger class.| Constructor and Description |
|---|
CamelLogProcessor() |
CamelLogProcessor(CamelLogger log) |
CamelLogProcessor(CamelLogger log,
ExchangeFormatter formatter) |
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Returns the id
|
CamelLogger |
getLogger() |
void |
process(Exchange exchange)
Processes the message exchange
|
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange.
|
void |
process(Exchange exchange,
String message) |
void |
process(Exchange exchange,
Throwable exception) |
void |
setId(String id)
Sets the id
|
void |
setLevel(LoggingLevel level) |
void |
setLogName(String logName) |
void |
setMarker(String marker) |
String |
toString() |
public CamelLogProcessor()
public CamelLogProcessor(CamelLogger log)
public CamelLogProcessor(CamelLogger log, ExchangeFormatter formatter)
public void process(Exchange exchange) throws Exception
Processorpublic boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessorProcessor.process(org.apache.camel.Exchange), but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception would be set on the Exchange.process in interface AsyncProcessorexchange - the message exchangecallback - the AsyncCallback will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.public CamelLogger getLogger()
public void setLogName(String logName)
public void setLevel(LoggingLevel level)
Apache Camel