From 644849cdc42efa6c7ed92dd3120dd214160c14fc Mon Sep 17 00:00:00 2001 From: Nick Sanford Date: Mon, 9 Sep 2024 15:32:19 -0400 Subject: [PATCH] improve logging --- services/datamanager/builtin/capture/capture.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/datamanager/builtin/capture/capture.go b/services/datamanager/builtin/capture/capture.go index 94ac63b9e39..d4285f41781 100644 --- a/services/datamanager/builtin/capture/capture.go +++ b/services/datamanager/builtin/capture/capture.go @@ -109,13 +109,12 @@ func (c *Capture) newCollectors(collectorConfigsByResource CollectorConfigsByRes // We only use service-level tags. cfg.Tags = config.Tags if cfg.Disabled { - c.logger.Infof("%s disabled. config: %s", md.String(), format(cfg)) + c.logger.Infof("collector disabled due to config `disabled` being true; collector: %s", md) continue } if cfg.CaptureFrequencyHz <= 0 { - msg := "%s disabled due to `capture_frequency_hz` being less than or equal to zero. config: %#v" - c.logger.Warnf(msg, md.String(), format(cfg)) + c.logger.Warnf("collector disabled due to config `capture_frequency_hz` being less than or equal to zero. collector: %s", md) continue }