From 027341c80b63905372b4c92584399a9673983d18 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Sat, 5 Jul 2014 19:31:26 +0200 Subject: [PATCH] Adds cache pressure in logger --- logger.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logger.go b/logger.go index dde0d5d..a593b5f 100644 --- a/logger.go +++ b/logger.go @@ -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, )