Преглед на файлове

Merge pull request #6 from rbtnn/set_formatter

デフォルトでカラーコードを吐いてくれなくなった。
mattn преди 10 години
родител
ревизия
40e4aedc8f
променени са 2 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 1 0
      README.md
  2. 1 0
      _example/main.go

+ 1 - 0
README.md

@@ -17,6 +17,7 @@ This package is possible to handle escape sequence for ansi color on windows.
 ## Usage
 
 ```go
+logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
 logrus.SetOutput(colorable.NewColorableStdout())
 
 logrus.Info("succeeded")

+ 1 - 0
_example/main.go

@@ -6,6 +6,7 @@ import (
 )
 
 func main() {
+	logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
 	logrus.SetOutput(colorable.NewColorableStdout())
 
 	logrus.Info("succeeded")