diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/LogMessage.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/LogMessage.java index 5ec07ebeec..152117fd28 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/LogMessage.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/LogMessage.java @@ -156,12 +156,9 @@ public class LogMessage extends AbstractProcessor { break; } - if (!isLogLevelEnabled) { - transferChunk(session); - return; + if (isLogLevelEnabled) { + processFlowFile(logger, logLevel, flowFile, context); } - - processFlowFile(logger, logLevel, flowFile, context); session.transfer(flowFile, REL_SUCCESS); } @@ -202,12 +199,4 @@ public class LogMessage extends AbstractProcessor { logger.debug(messageToWrite); } } - - private void transferChunk(final ProcessSession session) { - final List flowFiles = session.get(CHUNK_SIZE); - if (!flowFiles.isEmpty()) { - session.transfer(flowFiles, REL_SUCCESS); - } - } - }