]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Change `RemoteLoggerPool::toString` to describe just general stats
authorEnsar Sarajčić <dev@ensarsarajcic.com>
Fri, 7 Feb 2025 11:37:50 +0000 (12:37 +0100)
committerEnsar Sarajčić <dev@ensarsarajcic.com>
Fri, 7 Feb 2025 11:37:50 +0000 (12:37 +0100)
pdns/remote_logger_pool.cc

index 6b59bbaddc4817c68919a8d82f6c88d8b35be90e..354db23194d5771369250b93c4f3a415c73be908 100644 (file)
@@ -4,7 +4,6 @@
 #include <sys/un.h>
 
 #include "config.h"
-#include "lock.hh"
 #include "remote_logger_pool.hh"
 
 RemoteLoggerPool::RemoteLoggerPool(std::vector<std::shared_ptr<RemoteLoggerInterface>>&& pool) :
@@ -15,14 +14,7 @@ RemoteLoggerPool::RemoteLoggerPool(std::vector<std::shared_ptr<RemoteLoggerInter
 [[nodiscard]] std::string RemoteLoggerPool::toString()
 {
   auto stats = this->getStats();
-  std::string loggersDesc;
-  for (size_t i = 0; i < this->d_pool.size(); i++) {
-    if (i > 0) {
-      loggersDesc += ", ";
-    }
-    loggersDesc += d_pool[i]->toString();
-  }
-  return "RemoteLoggerPool of " + std::to_string(d_pool.size()) + " loggers (" + std::to_string(stats.d_queued) + " processed, " + std::to_string(stats.d_pipeFull + stats.d_tooLarge + stats.d_otherError) + " dropped)[ " + loggersDesc + "]";
+  return "Pool of " + std::to_string(d_pool.size()) + " loggers (" + std::to_string(stats.d_queued) + " processed, " + std::to_string(stats.d_pipeFull + stats.d_tooLarge + stats.d_otherError) + " dropped)";
 }
 
 RemoteLoggerInterface::Result RemoteLoggerPool::queueData(const std::string& data)