arpadboda commented on a change in pull request #648: WIP: Minificpp 1025 --
add metadata
URL: https://github.com/apache/nifi-minifi-cpp/pull/648#discussion_r329320390
##########
File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
##########
@@ -329,7 +404,14 @@ int ConsumeWindowsEventLog::processQueue(const
std::shared_ptr<core::ProcessSess
session->putAttribute(flowFile, FlowAttributeKey(MIME_TYPE),
"application/xml");
session->getProvenanceReporter()->receive(flowFile, provenanceUri_,
getUUIDStr(), "Consume windows event logs", 0);
session->transfer(flowFile, Success);
- session->commit();
+
+ flowFile = session->create();
+
+ session->write(flowFile, &WriteCallback(evt.rendered_text_));
+ session->putAttribute(flowFile, FlowAttributeKey(MIME_TYPE),
"text/plain");
+ session->getProvenanceReporter()->receive(flowFile, provenanceUri_,
getUUIDStr(), "Consume windows event logs", 0);
+ session->transfer(flowFile, Success);
Review comment:
@phrocker : if you check the second bulletpoint above, that's about keeping
success, but making the output configurable.
Don't get me wrong, I have no issue with keeping the current behavior as an
option, maybe even as a default option, but I don't feel it right to force the
user to use ROA in case he only needs one and not the other.
That's why I would introduce a property with 3 options:
- Both (default, current behaviour)
- Text only
- XML only
To keep aligned with NiFi, I'm happy to add this feature to the Java
codebase as well.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services