From 6d83ee2565b2b2dbbbc03e58220031d3d67821f7 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Wed, 18 Oct 2023 12:49:19 -0700 Subject: [PATCH] reduce spectatord logging (#75) The `Sent:` messages serve as a positive confirmation that spectatord is either delivering or dropping measurements, but there is generally no action to be taken from it directly, and this information is also recorded in the `spectator.measurements` metric. In the case of Titus, this message alone is responsible for 25% of all logs. Moving this message to the `debug` level drops it from the standard use case, while still allowing it to be accessed if the `--verbose` flag is passed to the binary. Fixes #71. --- spectator/publisher.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spectator/publisher.h b/spectator/publisher.h index 147f6bb..9782412 100644 --- a/spectator/publisher.h +++ b/spectator/publisher.h @@ -405,8 +405,8 @@ class Publisher { } auto elapsed = absl::Now() - start; - logger->info("Sent: {} Dropped: {} Total: {}. Elapsed {:.3f}s", num_sent, - num_err, measurements.size(), absl::ToDoubleSeconds(elapsed)); + logger->debug("Sent: {} Dropped: {} Total: {}. Elapsed {:.3f}s", num_sent, + num_err, measurements.size(), absl::ToDoubleSeconds(elapsed)); for (const auto& m : err_messages) { logger->info("Validation error: {}", m); }