aboutsummaryrefslogtreecommitdiff
path: root/src/dict2rest/logger.go
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2016-01-28 15:27:00 +0000
committerFelix Hanley <felix@userspace.com.au>2016-01-28 15:27:00 +0000
commitca192e88bc58d7fe4a24d4efddd2aec9c3e3cf24 (patch)
treee8a8f3246843b930b301afec33d0d14e02401e1b /src/dict2rest/logger.go
parentf276cdac82e4104fe6deb6d812a0fccdf8ce2d48 (diff)
downloadgo-dict2rest-ca192e88bc58d7fe4a24d4efddd2aec9c3e3cf24.tar.gz
go-dict2rest-ca192e88bc58d7fe4a24d4efddd2aec9c3e3cf24.tar.bz2
Refactor handlers to open a new connection for each request
Diffstat (limited to 'src/dict2rest/logger.go')
-rw-r--r--src/dict2rest/logger.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dict2rest/logger.go b/src/dict2rest/logger.go
index b4b1187..709666b 100644
--- a/src/dict2rest/logger.go
+++ b/src/dict2rest/logger.go
@@ -20,8 +20,8 @@ func Logger(next http.Handler) http.Handler {
size, _ := bw.Apply(w)
// Usually milliseconds
- latency := time.Since(startTime).Seconds()
+ latency := time.Since(startTime).Seconds() * 1000
- log.Printf("%s %s %d %d (%v)\n", r.Method, r.URL.Path, bw.Status, size, latency)
+ log.Printf("%s %s %d %d (%.1fms)\n", r.Method, r.URL.Path, bw.Status, size, latency)
})
}