From c13f5e05331a76307dff031346e729f23a7fb219 Mon Sep 17 00:00:00 2001 From: Riyaz Faizullabhoy Date: Mon, 5 Jun 2017 16:18:45 -0700 Subject: [PATCH] bump up default log level to warn, verbose to info Signed-off-by: Riyaz Faizullabhoy --- cmd/notary/integration_test.go | 4 ++-- cmd/notary/main.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/notary/integration_test.go b/cmd/notary/integration_test.go index 96eddcc45..21ad0d317 100644 --- a/cmd/notary/integration_test.go +++ b/cmd/notary/integration_test.go @@ -1725,12 +1725,12 @@ func TestLogLevelFlags(t *testing.T) { // Test default to fatal n := notaryCommander{} n.setVerbosityLevel() - require.Equal(t, "fatal", logrus.GetLevel().String()) + require.Equal(t, "warning", logrus.GetLevel().String()) // Test that verbose (-v) sets to error n.verbose = true n.setVerbosityLevel() - require.Equal(t, "error", logrus.GetLevel().String()) + require.Equal(t, "info", logrus.GetLevel().String()) // Test that debug (-D) sets to debug n.debug = true diff --git a/cmd/notary/main.go b/cmd/notary/main.go index 672ffca91..1aae07ada 100644 --- a/cmd/notary/main.go +++ b/cmd/notary/main.go @@ -243,14 +243,14 @@ func getPassphraseRetriever() notary.PassRetriever { } } -// Set the logging level to fatal on default, or the most specific level the user specified (debug or error) +// Set the logging level to warn on default, or the most verbose level the user specified (debug, info) func (n *notaryCommander) setVerbosityLevel() { if n.debug { logrus.SetLevel(logrus.DebugLevel) } else if n.verbose { - logrus.SetLevel(logrus.ErrorLevel) + logrus.SetLevel(logrus.InfoLevel) } else { - logrus.SetLevel(logrus.FatalLevel) + logrus.SetLevel(logrus.WarnLevel) } logrus.SetOutput(os.Stderr) }