Merge pull request #766 from jaffee/fix-ts-log

fix log which treats time.Duration as secs instead of ns
This commit is contained in:
Matthew Jaffee 2017-08-14 13:57:40 -05:00 committed by GitHub
commit 5a0eea2948

View file

@ -162,7 +162,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
statsTags := make([]string, 0, 3)
if h.Cluster.LongQueryTime > 0 && dif > h.Cluster.LongQueryTime {
h.logger().Printf("%s %s %.03fs", r.Method, r.URL.String(), float64(dif))
h.logger().Printf("%s %s %v", r.Method, r.URL.String(), dif)
statsTags = append(statsTags, "slow_query")
}