mirror of https://github.com/apache/nifi.git
NIFI-5652: Fixed LogMessage when logging level is disabled
This closes #3170. Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
This commit is contained in:
parent
4112af013d
commit
13011ac6d6
|
@ -156,12 +156,9 @@ public class LogMessage extends AbstractProcessor {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isLogLevelEnabled) {
|
if (isLogLevelEnabled) {
|
||||||
transferChunk(session);
|
processFlowFile(logger, logLevel, flowFile, context);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processFlowFile(logger, logLevel, flowFile, context);
|
|
||||||
session.transfer(flowFile, REL_SUCCESS);
|
session.transfer(flowFile, REL_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,12 +199,4 @@ public class LogMessage extends AbstractProcessor {
|
||||||
logger.debug(messageToWrite);
|
logger.debug(messageToWrite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void transferChunk(final ProcessSession session) {
|
|
||||||
final List<FlowFile> flowFiles = session.get(CHUNK_SIZE);
|
|
||||||
if (!flowFiles.isEmpty()) {
|
|
||||||
session.transfer(flowFiles, REL_SUCCESS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue