From ed5729a842a77ac677496b08c0027c42a22d2c81 Mon Sep 17 00:00:00 2001 From: Janos Dobronszki Date: Mon, 10 Aug 2020 14:57:45 +0200 Subject: [PATCH] Decrease log levels in router/registry package to not appear for CLI users (#1917) --- registry.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/registry.go b/registry.go index 86ad02a..ec46317 100644 --- a/registry.go +++ b/registry.go @@ -403,8 +403,8 @@ func (r *rtr) advertiseEvents() error { // routing table watcher w, err = r.Watch() if err != nil { - if logger.V(logger.ErrorLevel, logger.DefaultLogger) { - logger.Errorf("Error creating watcher: %v", err) + if logger.V(logger.DebugLevel, logger.DefaultLogger) { + logger.Debugf("Error creating watcher: %v", err) } time.Sleep(time.Second) continue @@ -412,8 +412,8 @@ func (r *rtr) advertiseEvents() error { } if err := r.watchTable(w); err != nil { - if logger.V(logger.ErrorLevel, logger.DefaultLogger) { - logger.Errorf("Error watching table: %v", err) + if logger.V(logger.DebugLevel, logger.DefaultLogger) { + logger.Debugf("Error watching table: %v", err) } time.Sleep(time.Second) } @@ -563,7 +563,7 @@ func (r *rtr) start() error { r.table.pruneRoutes(RefreshInterval) case <-t1.C: if err := r.loadRoutes(r.options.Registry); err != nil { - logger.Errorf("failed refreshing registry routes: %s", err) + logger.Debugf("failed refreshing registry routes: %s", err) } } } @@ -640,8 +640,8 @@ func (r *rtr) Advertise() (<-chan *router.Advert, error) { return default: if err := r.advertiseEvents(); err != nil { - if logger.V(logger.ErrorLevel, logger.DefaultLogger) { - logger.Errorf("Error adveritising events: %v", err) + if logger.V(logger.DebugLevel, logger.DefaultLogger) { + logger.Debugf("Error adveritising events: %v", err) } } }