From 4e2efec66ed4fc1ebfe316e1fff49b01708f4393 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Wed, 11 Dec 2019 13:13:30 +0100 Subject: [PATCH] disable logging for reflection --- blobs_reflector/reflect.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blobs_reflector/reflect.go b/blobs_reflector/reflect.go index ff650d1..150392e 100644 --- a/blobs_reflector/reflect.go +++ b/blobs_reflector/reflect.go @@ -12,6 +12,7 @@ import ( "github.com/lbryio/reflector.go/db" "github.com/lbryio/reflector.go/reflector" "github.com/lbryio/reflector.go/store" + "github.com/sirupsen/logrus" "github.com/lbryio/ytsync/util" ) @@ -53,7 +54,8 @@ func reflectBlobs() error { if running { return errors.Prefix("cannot reflect blobs as the daemon is running", err) } - + logrus.SetLevel(logrus.InfoLevel) + defer logrus.SetLevel(logrus.DebugLevel) ex, err := os.Executable() if err != nil { return errors.Err(err)