commit | ed7cf6d093d9c4fcdf624c1abb4848e69f6cf152 | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Fri Jan 10 01:04:40 2020 |
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Fri Jan 10 01:04:40 2020 |
tree | 36f0e1ddd09189e2edf0755005334fc9901f0ab1 | |
parent | 1792948862a7cba097c1b3e436595cabc76f0304 [diff] |
Update dependencies
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)