d93f1120 by cloudaice

fixed bug: in logs package check if platform is windows

1 parent 9384e870
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
4 "encoding/json" 4 "encoding/json"
5 "log" 5 "log"
6 "os" 6 "os"
7 "runtime"
7 ) 8 )
8 9
9 type Brush func(string) string 10 type Brush func(string) string
...@@ -54,7 +55,11 @@ func (c *ConsoleWriter) WriteMsg(msg string, level int) error { ...@@ -54,7 +55,11 @@ func (c *ConsoleWriter) WriteMsg(msg string, level int) error {
54 if level < c.Level { 55 if level < c.Level {
55 return nil 56 return nil
56 } 57 }
57 c.lg.Println(colors[level](msg)) 58 if goos := runtime.GOOS; goos == "windows" {
59 c.lg.Println(msg)
60 } else {
61 c.lg.Println(colors[level](msg))
62 }
58 return nil 63 return nil
59 } 64 }
60 65
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!