fgerlits commented on code in PR #1621:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1621#discussion_r1284360708


##########
libminifi/include/core/logging/LoggerConfiguration.h:
##########
@@ -64,6 +64,8 @@ struct LoggerNamespace {
 inline std::optional<std::string> formatId(std::optional<utils::Identifier> 
opt_id) {
   return opt_id | utils::map([](auto id) { return " (" + 
std::string(id.to_string()) + ")"; });
 }
+
+constexpr std::string_view UNLIMITED_LOG_ENTRY_LENGTH = "unlimited";

Review Comment:
   this should be `inline constexpr`, as it will be included in many cpp files



##########
libminifi/src/core/logging/LoggerConfiguration.cpp:
##########
@@ -132,6 +132,18 @@ void LoggerConfiguration::initialize(const 
std::shared_ptr<LoggerProperties> &lo
     include_uuid_ = 
utils::StringUtils::toBool(*include_uuid_str).value_or(true);
   }
 
+  if (const auto max_log_entry_length_str = 
logger_properties->getString("max.log.entry.length")) {
+    try {
+      if (internal::UNLIMITED_LOG_ENTRY_LENGTH == *max_log_entry_length_str) {
+        max_log_entry_length_ = -1;
+      } else {
+        max_log_entry_length_ = std::stoull(*max_log_entry_length_str);

Review Comment:
   since the type of `*max_log_entry_length_` has changed to `int`, this 
`stoull` should change to `stoi`, too



-- 
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