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_r317794876
########## 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: nm I see you made the map static ( didn't catch that at first ). I'll take a closer look at what you propose. thanks! ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services