From 572903798b262f4f0ac29fd39d88e0aa23dc28a3 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 22 Nov 2018 13:48:33 +0100 Subject: [PATCH] Provide more logging Signed-off-by: Knut Ahlers --- main.go | 2 ++ subdb.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/main.go b/main.go index 5a51e9a..173d004 100644 --- a/main.go +++ b/main.go @@ -87,5 +87,7 @@ func main() { log.WithError(err).Fatal("Unable to restore subscription db") } + log.WithField("version", version).Info("rss-status operative") + log.WithError(http.ListenAndServe(cfg.Listen, nil)).Fatal("HTTP-Server quit unexpectedly") } diff --git a/subdb.go b/subdb.go index 9174d65..9771c14 100644 --- a/subdb.go +++ b/subdb.go @@ -48,6 +48,11 @@ func newSubscriptionDB(p *pubsubhubbub.Publisher, db *bolt.DB) error { return b.Delete(k) } + log.WithFields(log.Fields{ + "topic": topicURL, + "callback": callbackURL, + "lease_end": s.LeaseEnd, + }).Debug("Re-registering subscription") return p.Register(topicURL, callbackURL, s.Secret, s.LeaseEnd) }) }); err != nil {