func LessLogging() (reset func()) {
	lvl := logrus.GetLevel()
	logrus.SetLevel(logrus.ErrorLevel)
	return func() { logrus.SetLevel(lvl) }
}
LessLogging is a test helper that decreases logging (in fact it sets its
level to Error). It returns a function which when called, resets it to its
previous level. Its useful to be called as follows in test/benchmarks:

func TestFoo(t *testing.T) {
defer LessLogging()()

// logging is set to Error for the whole test
}
package testutil
import "github.com/sirupsen/logrus"
func DisableLogging() (reset func()) {
	lvl := logrus.GetLevel()
	logrus.SetLevel(logrus.PanicLevel)
	return func() { logrus.SetLevel(lvl) }
}