Skip to content

Commit

Permalink
Merge pull request #129 from motemen/logger-output
Browse files Browse the repository at this point in the history
generally loggers should output STDERR by default
  • Loading branch information
Songmu authored Apr 27, 2019
2 parents a5761d2 + 90f87b1 commit 79a41ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions logger/log.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package logger

import (
"os"

"github.com/motemen/go-colorine"
)

Expand All @@ -23,6 +25,10 @@ var logger = colorine.NewLogger(
"error": colorine.Error,
}, colorine.Info)

func init() {
logger.SetOutput(os.Stderr)
}

func Log(prefix, message string) {
logger.Log(prefix, message)
}
Expand Down

0 comments on commit 79a41ff

Please sign in to comment.