From e769b5dd3795522ef976f7a1d185036d761f327b Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 4 Mar 2015 13:14:10 +0900 Subject: [PATCH] colorful logger on windows --- logger.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/logger.go b/logger.go index 5054f6ec..478953aa 100644 --- a/logger.go +++ b/logger.go @@ -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) {