From 4795a47c60fc3130db242ba2d4170397bc1fc974 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 25 Aug 2019 21:18:00 +0200 Subject: [PATCH] Be a little more verbose Signed-off-by: Knut Ahlers --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0749df7..a6522ef 100644 --- a/main.go +++ b/main.go @@ -60,9 +60,12 @@ func main() { go func(p providerDefinition) { defer wg.Done() + logger := log.WithField("provider", p.Name) + logger.Info("Starting domain list extraction") + entries, err := getDomainList(p) if err != nil { - log.WithField("provider", p.Name). + logger. WithError(err). Fatal("Unable to get domain list") } @@ -80,10 +83,12 @@ func main() { whitelist = addIfNotExists(whitelist, e) default: - log.WithField("provider", p.Name).Fatalf("Inavlid action %q", p.Action) + logger.Fatalf("Inavlid action %q", p.Action) } } + + logger.WithField("no_entries", len(entries)).Info("Extraction complete") }(p) }