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



##########
File path: extensions/windows-event-log/ConsumeWindowsEventLog.h
##########
@@ -133,17 +141,33 @@ class ConsumeWindowsEventLog : public core::Processor {
   std::wstring wstrQuery_;
   std::string regex_;
   bool resolve_as_attributes_;
-  bool apply_identifier_function_;
+  bool apply_identifier_function_{false};
   std::string provenanceUri_;
   std::string computerName_;
   uint64_t maxBufferSize_{};
   DWORD lastActivityTimestamp_{};
   std::mutex cache_mutex_;
   std::map<std::string, wel::WindowsEventLogHandler > providers_;
-  uint64_t batch_commit_size_;
+  uint64_t batch_commit_size_{};
+
+  struct OutputFormat {
+    void reset() {
+      *this = OutputFormat{};
+    }
+
+    bool xml{false};
+    bool plaintext{false};
+    struct {
+      explicit operator bool() const noexcept {
+        return raw || simple || flattened;
+      }
+
+      bool raw{false};
+      bool simple{false};
+      bool flattened{false};
+    } json;
+  } output_;

Review comment:
       I think the idea of list-type properties is orthogonal to this; we could 
have "XML,JSON" or "JSON,Plaintext" as the output format property.  A user 
would understand what "JSON" is; they would not know (without asking us or the 
support team) what JSONRaw, JSONSimple, JSONFlattened mean and how to choose 
between them.
   
   I understand you have had this discussion already and have made a decision, 
but I think it would be worth discussing it some more, as this decision causes 
our code to be more complex and the user interface more difficult to use, both 
meaning more work in the future.




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