Skip to content

Commit

Permalink
Change RemoteLoggerPool::toString to describe just general stats
Browse files Browse the repository at this point in the history
  • Loading branch information
esensar committed Feb 7, 2025
1 parent 6692e56 commit 8d43673
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pdns/remote_logger_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) :
Expand All @@ -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)
Expand Down

0 comments on commit 8d43673

Please sign in to comment.