Browse Source

No repeat call c.Writer.Status()

Dmitry Sedykh 11 years ago
parent
commit
9880758ddb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      logger.go

+ 1 - 1
logger.go

@@ -69,7 +69,7 @@ func Logger() HandlerFunc {
 		latency := end.Sub(start)
 		latency := end.Sub(start)
 		stdlogger.Printf("[GIN] %v |%s %3d %s| %12v | %s %4s %s\n",
 		stdlogger.Printf("[GIN] %v |%s %3d %s| %12v | %s %4s %s\n",
 			end.Format("2006/01/02 - 15:04:05"),
 			end.Format("2006/01/02 - 15:04:05"),
-			color, c.Writer.Status(), reset,
+			color, code, reset,
 			latency,
 			latency,
 			requester,
 			requester,
 			c.Req.Method, c.Req.URL.Path,
 			c.Req.Method, c.Req.URL.Path,