소스 검색

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")