commit | 11a925cff3d38c293ddc8c05a16b504e3e2c63be | [log] [tgz] |
---|---|---|
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Mon Aug 15 05:53:26 2022 |
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Mon Aug 15 05:53:26 2022 |
tree | 80ed57b4522db9ebbb32a7e3249d6a07a78d8774 | |
parent | e1bb79c8d53c38a60962ad4b8f658226cc983710 [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)