Log destination host
alex wennerberg alex@alexwennerberg.com
Sat, 02 Jan 2021 10:33:19 -0800
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
log.go
→
log.go
@@ -54,13 +54,17 @@ if uri == "" {
uri = url.RequestURI() } - buf := make([]byte, 0, 3*(len(host)+len(username)+len(req.Method)+len(uri)+len(req.Proto)+50)/2) + desthost := req.Host + + buf := make([]byte, 0, 3*(len(host)+len(desthost)+len(username)+len(req.Method)+len(uri)+len(req.Proto)+50)/2) buf = append(buf, host...) buf = append(buf, " - "...) buf = append(buf, username...) buf = append(buf, " ["...) buf = append(buf, ts.Format("02/Jan/2006:15:04:05 -0700")...) - buf = append(buf, `] "`...) + buf = append(buf, `] `...) + buf = append(buf, desthost...) + buf = append(buf, ` "`...) buf = append(buf, req.Method...) buf = append(buf, " "...) buf = appendQuoted(buf, uri)