You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "fgerlits (via GitHub)" <gi...@apache.org> on 2023/04/17 15:42:21 UTC
[GitHub] [nifi-minifi-cpp] fgerlits commented on a diff in pull request #1559: MINIFICPP-2105 - Validate ConsumeWindowsEventLogs output/json format
fgerlits commented on code in PR #1559:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1559#discussion_r1168924977
##########
extensions/windows-event-log/ConsumeWindowsEventLog.h:
##########
@@ -167,23 +159,21 @@ class ConsumeWindowsEventLog : public core::Processor {
uint64_t batch_commit_size_{};
bool cache_sid_lookups_ = true;
- SMART_ENUM(JSONType,
- (None, "None"),
- (Raw, "Raw"),
- (Simple, "Simple"),
- (Flattened, "Flattened"))
-
- struct OutputFormat {
- bool xml{false};
- bool plaintext{false};
- struct JSON {
- JSONType type{JSONType::None};
-
- explicit operator bool() const noexcept {
- return type != JSONType::None;
- }
- } json;
- } output_;
+ SMART_ENUM(OutputFormatT,
+ (XML, "XML"),
+ (BOTH, "Both"),
+ (PLAINTEXT, "Plaintext"),
+ (JSON, "JSON")
+ );
+
+ SMART_ENUM(JsonFormatT,
+ (RAW, "Raw"),
+ (SIMPLE, "Simple"),
+ (FLATTENED, "Flattened")
+ );
Review Comment:
I like this refactoring, and also like the `JsonType` -> `JsonFormat` name change, but I would drop the `T` ending: just `OutputFormat` and `JsonFormat` would be better.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org