forked from mirror/gin
Merge branch 'mattn-colorful-logger-on-windows' into develop
This commit is contained in:
commit
38eb9676dc
|
@ -5,8 +5,8 @@
|
||||||
package gin
|
package gin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/mattn/go-colorable"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ func ErrorLoggerT(typ uint32) HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Logger() HandlerFunc {
|
func Logger() HandlerFunc {
|
||||||
stdlogger := log.New(os.Stdout, "", 0)
|
stdlogger := log.New(colorable.NewColorableStdout(), "", 0)
|
||||||
//errlogger := log.New(os.Stderr, "", 0)
|
//errlogger := log.New(os.Stderr, "", 0)
|
||||||
|
|
||||||
return func(c *Context) {
|
return func(c *Context) {
|
||||||
|
|
Loading…
Reference in New Issue