adamdebreceni commented on a change in pull request #976:
URL: https://github.com/apache/nifi-minifi-cpp/pull/976#discussion_r559353170



##########
File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
##########
@@ -252,11 +251,27 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptr<core::ProcessConte
   std::string mode;
   context->getProperty(OutputFormat.getName(), mode);
 
-  writeXML_ = (mode == Both || mode == XML);
-
-  writePlainText_ = (mode == Both || mode == Plaintext);
+  output_.reset();
+  if (mode == XML) {
+    output_.xml = true;
+  } else if (mode == Plaintext) {
+    output_.plaintext = true;
+  } else if (mode == Both) {
+    output_.xml = true;
+    output_.plaintext = true;
+  } else if (mode == JSONRaw) {
+    output_.json.raw = true;
+  } else if (mode == JSONSimple) {
+    output_.json.simple = true;
+  } else if (mode == JSONFlattened) {
+    output_.json.flattened = true;
+  } else {
+    // in the future this might be considered an error, but for now due to 
backwards
+    // compatibility we just fall through and execute the processor outputing 
nothing
+    // throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Unrecognized output 
format: " + mode);

Review comment:
       I don't know of such a marker, but note that based on the allowable 
values this branch should be impossible to reach if the check happens during 
the yaml parsing, this check is currently optional and I am not sure if we plan 
on switching it on by default from 1.0




----------------------------------------------------------------
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]


Reply via email to