[
https://issues.apache.org/jira/browse/CAMEL-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13751988#comment-13751988
]
Devendra Khanolkar commented on CAMEL-6466:
-------------------------------------------
hey mate, can you pls send me the custom formatter / test case as that would
help me quickly replicating the issue and coming up with a test case.
> Log component URI parameters should be able to override custom formatter
> properties
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-6466
> URL: https://issues.apache.org/jira/browse/CAMEL-6466
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.11.0
> Reporter: Nathan Jensen
> Priority: Minor
> Fix For: Future
>
>
> Our project uses a custom log formatter of type
> org.apache.camel.component.log.LogFormatter, the only difference is we have
> changed the defaults from camel's standard defaults. Unfortunately, by
> registering a custom formatter we can no longer have a route specifically
> diverge from the system wide formatter for special cases.
> For example, the following works when we don't have a custom formatter but
> fails when do have a custom formatter:
> <touri="log:pluginName?level=ERROR&showBody=false&showCaughtException=true&showStackTrace=true"/>
> It fails with a FailedToCreateRouteException with the message "There are 3
> parameters that couldn't be set on the endpoint. Check the uri if the
> parameters are spelt correctly and that they are properties of the endpoint.
> Unknown parameters=[{showBody=false, showCaughtException=true,
> showStackTrace=true}]".
> The root of the problem is that the logic in LogComponent.createEndpoint()
> only sets the URI parameters on the localFormatter if there is no custom
> formatter already registered, otherwise it tries to set the parameters on the
> endpoint itself and not the formatter.
> It would be nice if the log route URIs were able to override parameters on
> the custom formatter for routes that need special cases.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira