nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] phrocker commented on a change in pull request #630: MINIFICPP-1006: minor updates for jni building using win build & correct artifact naming
Date Mon, 26 Aug 2019 20:54:28 GMT
phrocker commented on a change in pull request #630: MINIFICPP-1006: minor updates for jni
building using win build & correct artifact naming
URL: https://github.com/apache/nifi-minifi-cpp/pull/630#discussion_r317794228
 
 

 ##########
 File path: extensions/windows-event-log/wel/MetadataWalker.cpp
 ##########
 @@ -0,0 +1,116 @@
+#include "MetadataWalker.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace wel {
+
+bool MetadataWalker::for_each(pugi::xml_node &node) {
+  // don't shortcut resolution here so that we can log attributes.
+  std::string node_name = node.name();
+  if (node_name == "Data") {
+
+    for (pugi::xml_attribute attr : node.attributes()) {
+
+      if (std::regex_match(attr.name(), regex_)) {
+        std::function<std::string(const std::string &)> idUpdate = [&](const
std::string &input) -> std::string {
+          return resolve_ ? utils::OsUtils::userIdToUsername(input) : input;
+        };
+        updateText(node, attr.name(), std::move(idUpdate));
+
+      }
+      if (std::regex_match(attr.value(), regex_)) {
+        std::function<std::string(const std::string &)> idUpdate = [&](const
std::string &input) -> std::string {
+          return resolve_ ? utils::OsUtils::userIdToUsername(input) : input;
+        };
+        updateText(node, attr.value(), std::move(idUpdate));
+      }
+    }
+  } else if (node_name == "Channel") {
 
 Review comment:
   I'll create a follow on ticket to explore that more, though

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message