From 2ec28dcb8315d933a24d7242c820317c2e88920a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Mon, 14 Feb 2022 18:05:25 -0500 Subject: [PATCH] dhtrunner: use configured logger for dropped packets --- src/dhtrunner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dhtrunner.cpp b/src/dhtrunner.cpp index f5a4aced..51468ca3 100644 --- a/src/dhtrunner.cpp +++ b/src/dhtrunner.cpp @@ -705,8 +705,8 @@ DhtRunner::loop_() rcv_free.splice(rcv_free.end(), std::move(received_treated)); } - if (dropped) - std::cerr << "Dropped " << dropped << " packets with high delay" << std::endl; + if (dropped && logger_) + logger_->e("[runner %p] Dropped %zu packets with high delay.", this, dropped); NodeStatus nstatus4 = dht->updateStatus(AF_INET); NodeStatus nstatus6 = dht->updateStatus(AF_INET6); -- GitLab