From 8f6e6ee8bb4018956ce7288703cb55daf2b9ad67 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Tue, 17 Oct 2023 18:52:38 +0200 Subject: [PATCH] improve logging output --- cmd/csaf_aggregator/config.go | 5 +++-- cmd/csaf_downloader/downloader.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/csaf_aggregator/config.go b/cmd/csaf_aggregator/config.go index 596c0567..ecc88dc8 100644 --- a/cmd/csaf_aggregator/config.go +++ b/cmd/csaf_aggregator/config.go @@ -178,8 +178,9 @@ func (p *provider) ageAccept(c *config) func(time.Time) bool { } if c.Verbose { - s, _ := r.MarshalJSON() - log.Printf("Setting up filter to accept docs within TimeRange %s", s) + log.Printf( + "Setting up filter to accept advisories within time range %s to %s\n", + r[0].Format(time.RFC3339), r[1].Format(time.RFC3339)) } return r.Contains } diff --git a/cmd/csaf_downloader/downloader.go b/cmd/csaf_downloader/downloader.go index 57395771..d40f31b3 100644 --- a/cmd/csaf_downloader/downloader.go +++ b/cmd/csaf_downloader/downloader.go @@ -204,8 +204,8 @@ func (d *downloader) download(ctx context.Context, domain string) error { // Do we need time range based filtering? if d.cfg.Range != nil { - slog.Debug("Setting up filter to accept documents within", - "TimeRange", d.cfg.Range) + slog.Debug("Setting up filter to accept advisories within", + "timerange", d.cfg.Range) afp.AgeAccept = d.cfg.Range.Contains }