szaszm commented on code in PR #1670:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1670#discussion_r1342430096


##########
libminifi/src/FlowFileRecord.cpp:
##########
@@ -50,17 +50,17 @@ std::shared_ptr<FlowFileRecord> 
FlowFileRecord::DeSerialize(const std::string& k
   std::string value;
 
   if (!flowRepository->Get(key, value)) {
-    logger_->log_error("NiFi FlowFile Store event %s can not found", key);
+    logger_->log_error("NiFi FlowFile Store event {} can not found", key);
     return nullptr;
   }
   io::BufferStream stream(value);
 
   auto record = DeSerialize(stream, content_repo, container);
 
   if (record) {
-    logger_->log_debug("NiFi FlowFile retrieve uuid %s size " "%" PRIu64 " 
connection %s success", record->getUUIDStr(), stream.size(), 
container.to_string());
+    logger_->log_debug("NiFi FlowFile retrieve uuid {} size {} connection {} 
success", record->getUUIDStr(), stream.size(), container.to_string());
   } else {
-    logger_->log_debug("Couldn't deserialize FlowFile %s from the stream of 
size " "%" PRIu64, key, stream.size());
+    logger_->log_debug("Couldn't deserialize FlowFile {} from the stream of 
size " "{}", key, stream.size());

Review Comment:
   There are many instances of having the string literal split into two parts, 
where `PRIu64` or similar format specifiers were used. Splitting is no longer 
necessary with fmt, so I think we should join those strings back to a single 
string literal.
   ```suggestion
       logger_->log_debug("Couldn't deserialize FlowFile {} from the stream of 
size {}", key, stream.size());
   ```
   
   edit: after looking again, it doesn't seem as widespread, maybe only this 
file is affected. There are 3 instances of this problem in this file.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to