Commit ab8f8d53 authored by astaxie's avatar astaxie

Merge pull request #487 from cloudaice/log-feature

fixed bug: in logs package check if platform is windows
parents 9384e870 d93f1120
......@@ -4,6 +4,7 @@ import (
"encoding/json"
"log"
"os"
"runtime"
)
type Brush func(string) string
......@@ -54,7 +55,11 @@ func (c *ConsoleWriter) WriteMsg(msg string, level int) error {
if level < c.Level {
return nil
}
c.lg.Println(colors[level](msg))
if goos := runtime.GOOS; goos == "windows" {
c.lg.Println(msg)
} else {
c.lg.Println(colors[level](msg))
}
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment