THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Wiki Markup |
---|
{snippet:id=e3|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java} |
Logging Error Handler
The logging error handler will log (by default at ERROR level) whenever an uncaught exception is thrown. The logging category, logger and level may all be defined in the builder.
Code Block |
---|
errorHandler(loggingErrorHandler("mylogger.name").level(LoggingLevel.INFO));
|
This would create an error handler which logs exceptions using the category mylogger.name and uses the level INFO for all log messages created.
Code Block |
---|
from("seda:a").errorHandler(loggingErrorHandler("mylogger.name").level(LoggingLevel.DEBUG).to("seda:b");
|
Loggers may also be defined for specific routes.
Overriding default behavior
...