forked from mirror/gin
Merge branch 'colorful-logger-on-windows' of https://github.com/mattn/gin into mattn-colorful-logger-on-windows
This commit is contained in:
commit
1143d3c4d5
|
@ -6,8 +6,9 @@ package gin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/mattn/go-colorable"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -38,7 +39,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