better display for log message

This commit is contained in:
novaeye 2016-05-19 17:46:21 +08:00
parent 542be2fe77
commit e1fbee5f75

View File

@ -75,7 +75,7 @@ func LoggerWithWriter(out io.Writer, notlogged ...string) HandlerFunc {
methodColor := colorForMethod(method)
comment := c.Errors.ByType(ErrorTypePrivate).String()
fmt.Fprintf(out, "[GIN] %v |%s %3d %s| %13v | %s |%s %s %-7s %s\n%s",
fmt.Fprintf(out, "[GIN] %v |%s %3d %s| %13v | %15s |%s %s %-7s %s\n%s",
end.Format("2006/01/02 - 15:04:05"),
statusColor, statusCode, reset,
latency,