summaryrefslogtreecommitdiffhomepage
path: root/tsweb/log.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@tailscale.com>2020-07-13 11:53:26 +1000
committerDavid Crawshaw <crawshaw@tailscale.com>2020-07-13 11:56:06 +1000
commitd7ffecdfc927a7f348e3835c911f1dd9d7b16cfd (patch)
tree6fa1849cd2c5147b543da5e432c002e92e7e942e /tsweb/log.go
parent977381f9ccf1f2865b9e2749a9d95851ad2bac55 (diff)
downloadtailscale-crawshaw/tswebextra.tar.xz
tailscale-crawshaw/tswebextra.zip
tsweb: extra logging fields for HTTP handlerscrawshaw/tswebextra
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
Diffstat (limited to 'tsweb/log.go')
-rw-r--r--tsweb/log.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/tsweb/log.go b/tsweb/log.go
index e7928af04..18f7796bf 100644
--- a/tsweb/log.go
+++ b/tsweb/log.go
@@ -46,6 +46,12 @@ type AccessLogRecord struct {
Bytes int `json:"bytes"`
// Error encountered during request processing.
Err string `json:"err"`
+
+ // Extra contains extra fields logged by the HTTP handler.
+ //
+ // It is called "x" in the JSON both for brevity and so
+ // it comes last.
+ Extra map[string]string `json:"x,omitempty"`
}
// String returns m as a JSON string.