You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/06/02 20:00:00 UTC
[jira] [Commented] (NIFI-11628) SimpleProcessLogger substitutes the "Object[] + Throwable" arguments incorrectly
[ https://issues.apache.org/jira/browse/NIFI-11628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728858#comment-17728858 ]
ASF subversion and git services commented on NIFI-11628:
--------------------------------------------------------
Commit 803868935afc424bf0b69b6b82802e557e689c04 in nifi's branch refs/heads/main from Peter Turcsanyi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=803868935a ]
NIFI-11628 Fixed Object[] and Throwable argument substitution in SimpleProcessLogger
This closes #7362
Signed-off-by: David Handermann <ex...@apache.org>
> SimpleProcessLogger substitutes the "Object[] + Throwable" arguments incorrectly
> --------------------------------------------------------------------------------
>
> Key: NIFI-11628
> URL: https://issues.apache.org/jira/browse/NIFI-11628
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Peter Turcsanyi
> Assignee: Peter Turcsanyi
> Priority: Major
> Fix For: 1.latest, 2.latest
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {{SimpleProcessLogger}} substitutes the log message arguments incorrectly when the {{Object[] + Throwable}} signature is used.
> The Object[] (containing the log message arguments) is treated as a single argument and the whole array is replaced in the first {} placeholder, while the remaining {} placeholders stay unresolved.
> Incorrect:
> {noformat}
> 2023-06-01 21:44:24,805 ERROR [Timer-Driven Process Thread-4] o.a.n.p.helloworld.HelloWorldProcessor [HelloWorldProcessor[id=73713c8d-0188-1000-4fcc-49c35b7d0a4e], foo, bar] Fatal error: arg1={}, arg2={}
> java.lang.Exception: Error occurred
> at org.apache.nifi.processors.helloworld.HelloWorldProcessor.onTrigger(HelloWorldProcessor.java:95)
> at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> {noformat}
> Expected:
> {noformat}
> 2023-06-01 22:31:03,254 ERROR [Timer-Driven Process Thread-2] o.a.n.p.helloworld.HelloWorldProcessor HelloWorldProcessor[id=73713c8d-0188-1000-4fcc-49c35b7d0a4e] Fatal error: arg1=foo, arg2=bar
> java.lang.Exception: Error occurred
> at org.apache.nifi.processors.helloworld.HelloWorldProcessor.onTrigger(HelloWorldProcessor.java:95)
> at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)