more idiomatic logger initialisation, with standard default log level

This commit is contained in:
Matthias Radestock committed 2015-08-18 12:04:48 +01:00
1 parent 0b4e8b8754
commit c1c5450caf
1 file changed
+2 -6
+2 -6
View File
@@ -3,7 +3,6 @@ package common
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"os"
"strings" "strings"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
@@ -42,11 +41,8 @@ var (
) )
func init() { func init() {
Log = &logrus.Logger{ Log = logrus.New()
Out: os.Stderr, Log.Formatter = standardTextFormatter
Formatter: standardTextFormatter,
Hooks: make(logrus.LevelHooks),
}
} }
func SetLogLevel(levelname string) { func SetLogLevel(levelname string) {