You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/10/17 18:17:40 UTC

[GitHub] [nifi] turcsanyip commented on a diff in pull request #6540: NIFI-10656 Log ignored event with info instead of warning

turcsanyip commented on code in PR #6540:
URL: https://github.com/apache/nifi/pull/6540#discussion_r997373650


##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureDataLakeStorage.java:
##########
@@ -161,10 +161,10 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
                 if (dlsException.getStatusCode() == 409) {
                     if (conflictResolution.equals(IGNORE_RESOLUTION)) {
                         session.transfer(flowFile, REL_SUCCESS);
-                        String warningMessage = String.format("File with the same name already exists. " +
+                        final String logMessage = String.format("File with the same name already exists. " +
                                 "Remote file not modified. " +
                                 "Transferring {} to success due to %s being set to '%s'.", CONFLICT_RESOLUTION.getDisplayName(), conflictResolution);
-                        getLogger().warn(warningMessage, new Object[]{flowFile});
+                        getLogger().info(logMessage, flowFile);
                     } else {
                         throw dlsException;
                     }

Review Comment:
   @nandorsoma Logging the "ignore" case at `info` level instead of `warn` makes sense as it is the normal behaviour in this case and the FF is transferred to success. E.g. `PutHDFS` does the same for ignore.
   
   However, there is an underlying issue: `renameFile()` has already logged an error regardless of the `Conflict Resolution Strategy` so the red bulletin will pop up on the processor whatever log level we use here. I think `renameFile()` should not log anything but should rethrow the 409 error and we can decide to log it at `info` vs `error` level in this `if-else`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org