commit | d6fadc1b6196bd8aba083e8506b8f8d24a756149 | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Sat Mar 04 14:15:34 2017 |
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Sat Mar 04 14:15:55 2017 |
tree | b08d30cac19d3eddba01f2db6db55b0128e911e6 | |
parent | d898aa9fb31c91f35dd28ca75db377eff023c076 [diff] |
add badges
Colorable writer for windows.
For example, most of logger packages doesn‘t show colors on windows. (I know we can do it with ansicon. But I don’t want.) This package is possible to handle escape sequence for ansi color on windows.
logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
logrus.SetOutput(colorable.NewColorableStdout())
logrus.Info("succeeded")
logrus.Warn("not correct")
logrus.Error("something error")
logrus.Fatal("panic")
You can compile above code on non-windows OSs.
$ go get github.com/mattn/go-colorable
MIT
Yasuhiro Matsumoto (a.k.a mattn)