[ 
https://issues.apache.org/jira/browse/NIFI-2362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15389752#comment-15389752
 ] 

Mark Payne commented on NIFI-2362:
----------------------------------

[~devriesb] both of the above log messages *should* produce the same results. 
The call to error() in the former should end up calling error() that takes the 
last argument as a Throwable. I.e., the error() method of SimpleProcessLogger 
does the following:

if (lastArgIsException(os)) {
   error(msg, translateException(os), (Throwable) os[os.length - 1]);
}

If you are not seeing a stack trace, i think it would indicate a bug in the 
SimpleProcessLogger, rather than BinFiles.

> BinFiles: incorrect error logging
> ---------------------------------
>
>                 Key: NIFI-2362
>                 URL: https://issues.apache.org/jira/browse/NIFI-2362
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Brandon DeVries
>            Priority: Minor
>
> In BinFile\[1\], the error logging line:
> {code}
> logger.error("Failed to process bundle of {} files due to {}", new 
> Object[]{binCopy.size(), e});
> {code}
> should be:
> {code}
> logger.error("Failed to process bundle of {} files", new 
> Object[]{binCopy.size()}, e);
> {code}
> (the exception "e" should be outside the Object array, so you can get a stack 
> trace if in DEBUG mode)
> [\1\] 
> https://github.com/apache/nifi/blob/rel/nifi-0.7.0/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/BinFiles.java#L230



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to