colorful logger on windows

This commit is contained in:
Yasuhiro Matsumoto 2015-03-04 13:14:10 +09:00
parent 3aa0e9c2e0
commit e769b5dd37
1 changed files with 3 additions and 2 deletions

View File

@ -6,8 +6,9 @@ package gin
import (
"log"
"os"
"time"
"github.com/mattn/go-colorable"
)
var (
@ -38,7 +39,7 @@ func ErrorLoggerT(typ uint32) HandlerFunc {
}
func Logger() HandlerFunc {
stdlogger := log.New(os.Stdout, "", 0)
stdlogger := log.New(colorable.NewColorableStdout(), "", 0)
//errlogger := log.New(os.Stderr, "", 0)
return func(c *Context) {