szaszm commented on a change in pull request #709: MINIFICPP-1088 - clean up 
minifiexe and MINIFI_HOME logic
URL: https://github.com/apache/nifi-minifi-cpp/pull/709#discussion_r367490826
 
 

 ##########
 File path: libminifi/test/TestBase.cpp
 ##########
 @@ -18,6 +18,21 @@
 
 #include "./TestBase.h"
 
+#include "spdlog/spdlog.h"
+
+void LogTestController::setLevel(const std::string name, 
spdlog::level::level_enum level) {
+  logger_->log_info("Setting log level for %s to %s", name, 
spdlog::level::to_str(level));
+  std::string adjusted_name = name;
+  const std::string clazz = "class ";
+  auto haz_clazz = name.find(clazz);
+  if (haz_clazz == 0)
+    adjusted_name = name.substr(clazz.length(), name.length() - 
clazz.length());
+  if (config && config->shortenClassNames()) {
+    utils::ClassUtils::shortenClassName(adjusted_name, adjusted_name);
+  }
 
 Review comment:
   I believe the logic to fix class names doesn't belong here but rather in a 
function that's used to query class names.

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

Reply via email to