api: add call duration in logs

This commit is contained in:
Quentin Machu 2016-02-20 15:38:51 -05:00 committed by Jimmy Zelinskie
parent 06531e01c5
commit 8d76700506

View File

@ -54,7 +54,7 @@ func HTTPHandler(handler Handler, ctx *RouteContext) httprouter.Handle {
}
utils.PrometheusObserveTimeMilliseconds(promResponseDurationMilliseconds.WithLabelValues(route, statusStr), start)
log.Infof("%s \"%s %s\" %s", r.RemoteAddr, r.Method, r.RequestURI, statusStr)
log.Infof("%s \"%s %s\" %s (%s)", r.RemoteAddr, r.Method, r.RequestURI, statusStr, time.Since(start))
}
}