Skip to content

Commit

Permalink
Adds cache pressure in logger
Browse files Browse the repository at this point in the history
manucorporat committed Jul 5, 2014
1 parent db25989 commit 027341c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion logger.go
Original file line number Diff line number Diff line change
@@ -48,10 +48,11 @@ func Logger() HandlerFunc {
color = red
}
latency := time.Since(start)
logger.Printf("[GIN] %v |%s %3d %s| %12v | %3s %s\n",
logger.Printf("[GIN] %v |%s %3d %s| %12v | %3.1f%% | %3s | %s\n",
time.Now().Format("2006/01/02 - 15:04:05"),
color, c.Writer.Status(), reset,
latency,
c.Engine.CacheStress()*100,
c.Req.Method, c.Req.URL.Path,
)

0 comments on commit 027341c

Please sign in to comment.