log
log copied to clipboard
Use color to support colored ouput for windows
As titled https://github.com/fatih/color
Workaround:
package main
import (
"github.com/apex/log"
"github.com/apex/log/handlers/text"
"github.com/mattn/go-colorable"
)
func main() {
aa := colorable.NewColorableStdout()
log.SetHandler(text.New(aa))
log.Warn("bb")
}
Or:
package main
import "github.com/labstack/gommon/log"
func main() {
log.EnableColor()
log.Warn("bb")
}