[
https://issues.apache.org/jira/browse/CAMEL-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167394#comment-13167394
]
Claus Ibsen commented on CAMEL-4760:
------------------------------------
The logging error handler is not for logging redelivery attempts and
stacktraces etc. All it can do is log the failed *message*, not the cause of
the problem etc.
What you are asking for is to configure the log name on the redelivery based
error handlers.
You can configure many options about which level to use and whether to log
stack traces etc.
See the API
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html
What is missing is to configure the log name, as Camel will currently always
use the class name of the error handler implementation.
> Unable to set logName on DefaultErrorHandler as well as executorService on
> LoggingErrorHandler
> ----------------------------------------------------------------------------------------------
>
> Key: CAMEL-4760
> URL: https://issues.apache.org/jira/browse/CAMEL-4760
> Project: Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.8.3
> Reporter: Sergey Zhemzhitsky
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.8.4, 2.9.0
>
>
> The following snippets do not work, although each of the specified error
> handlers supports _logName_ and _executorServiceRef_. The issue is actual for
> the _DeadLetterChannel_ error handler too.
> {code:title=LoggingErrorHandler}
> <errorHandler id="errorHandler" type="LoggingErrorHandler"
> logName="${router.logger.name}" executorServiceRef="redeliveryExecutor"/>
> {code}
> {code:title=DefaultErrorHandler}
> <errorHandler id="errorHandler" type="DefaultErrorHandler"
> logName="${router.logger.name}" executorServiceRef="redeliveryExecutor"/>
> {code}
> {code:title=StackTrace}
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexpected exception parsing XML document from class path resource
> [META-INF/spring/camel-context.xml]; nested exception is
> java.lang.IllegalArgumentException: Attribute executorServiceRef is not
> supported by error handler type: LoggingErrorHandler, in error handler with
> id: errorHandler
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186)
> ... 42 more
> Caused by: java.lang.IllegalArgumentException: Attribute executorServiceRef
> is not supported by error handler type: LoggingErrorHandler, in error handler
> with id: errorHandler
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira