phrocker commented on a change in pull request #648: WIP: Minificpp 1025 -- add
metadata
URL: https://github.com/apache/nifi-minifi-cpp/pull/648#discussion_r329140593
##########
File path: extensions/windows-event-log/wel/MetadataWalker.cpp
##########
@@ -17,21 +19,62 @@ bool MetadataWalker::for_each(pugi::xml_node &node) {
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;
+ if (resolve_) {
+ auto resolved =
utils::OsUtils::userIdToUsername(input);
+ replaced_identifiers_[input] =
resolved;
+ return resolved;
+ }
+ else {
+ replaced_identifiers_[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 {
Review comment:
@am-c-p-p this too. thanks @arpadboda
----------------------------------------------------------------
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]
With regards,
Apache Git Services