From c1c5450caf6fd4dbfd69ffd5410785c1bbb43c07 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 18 Aug 2015 12:04:48 +0100 Subject: [PATCH] more idiomatic logger initialisation, with standard default log level --- common/logging.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/logging.go b/common/logging.go index d6e86c79..074eb850 100644 --- a/common/logging.go +++ b/common/logging.go @@ -3,7 +3,6 @@ package common import ( "bytes" "fmt" - "os" "strings" "github.com/Sirupsen/logrus" @@ -42,11 +41,8 @@ var ( ) func init() { - Log = &logrus.Logger{ - Out: os.Stderr, - Formatter: standardTextFormatter, - Hooks: make(logrus.LevelHooks), - } + Log = logrus.New() + Log.Formatter = standardTextFormatter } func SetLogLevel(levelname string) {