This is an automated email from the ASF dual-hosted git repository.
phrocker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new e1866d7 MINIFICPP-884 - Fix LogAttribute logging multiple FlowFiles
e1866d7 is described below
commit e1866d7ea16533465406f51cf9e027a26767ac77
Author: Daniel Bakai <[email protected]>
AuthorDate: Tue May 28 16:36:40 2019 +0200
MINIFICPP-884 - Fix LogAttribute logging multiple FlowFiles
This closes #572.
Signed-off-by: Marc Parisi <[email protected]>
---
extensions/standard-processors/processors/LogAttribute.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extensions/standard-processors/processors/LogAttribute.cpp
b/extensions/standard-processors/processors/LogAttribute.cpp
index 2309d0e..6ffa397 100644
--- a/extensions/standard-processors/processors/LogAttribute.cpp
+++ b/extensions/standard-processors/processors/LogAttribute.cpp
@@ -94,7 +94,6 @@ void LogAttribute::onTrigger(const
std::shared_ptr<core::ProcessContext> &contex
std::string dashLine = "--------------------------------------------------";
LogAttrLevel level = LogAttrLevelInfo;
bool logPayload = false;
- std::ostringstream message;
uint64_t i = 0;
const auto max = flowfiles_to_log_ == 0 ? UINT64_MAX : flowfiles_to_log_;
@@ -115,6 +114,7 @@ void LogAttribute::onTrigger(const
std::shared_ptr<core::ProcessContext> &contex
context->getProperty(LogPayload.getName(), logPayload);
+ std::ostringstream message;
message << "Logging for flow file " << "\n";
message << dashLine;
message << "\nStandard FlowFile Attributes";
@@ -146,7 +146,7 @@ void LogAttribute::onTrigger(const
std::shared_ptr<core::ProcessContext> &contex
}
}
}
- message << "\n" << dashLine << std::ends;
+ message << "\n" << dashLine;
std::string output = message.str();
switch (level) {