package logger import ( "io" "os" "github.com/sirupsen/logrus" ) func NewLogger(output io.Writer) *logrus.Logger { l := logrus.New() l.SetFormatter(&logrus.TextFormatter{}) l.SetLevel(logrus.DebugLevel) if output != nil { l.SetOutput(output) } else { l.SetOutput(os.Stdout) } return l }