diff options
Diffstat (limited to 'dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/logrus')
-rw-r--r-- | dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/logrus/main.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/logrus/main.go b/dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/logrus/main.go new file mode 100644 index 0000000..c569164 --- /dev/null +++ b/dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/logrus/main.go @@ -0,0 +1,16 @@ +package main + +import ( + "github.com/mattn/go-colorable" + "github.com/sirupsen/logrus" +) + +func main() { + logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) + logrus.SetOutput(colorable.NewColorableStdout()) + + logrus.Info("succeeded") + logrus.Warn("not correct") + logrus.Error("something error") + logrus.Fatal("panic") +} |