commit | b568324456e071ec014e2f88a00f756f7d0d4390 | [log] [tgz] |
---|---|---|
author | mattn <mattn.jp@gmail.com> | Mon Sep 30 17:29:48 2019 |
committer | GitHub <noreply@github.com> | Mon Sep 30 17:29:48 2019 |
tree | 2987b18c2fbfd1b42472829073d77c5b33475deb | |
parent | 7c3dac049bfe364948c9de716e8ea6932b3066b0 [diff] | |
parent | e7796444f8480bce1f32756e726714853604c9d5 [diff] |
Merge pull request #42 from ncw/fix-40 Make move to start of line with 0 parameter work - Fixes #40
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)