From 63e342bba1857f1b813f02a5e2d03e5d067370a4 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 1 Oct 2017 08:49:59 -0700 Subject: [PATCH] tun2: log more info per request --- internal/tun2/server.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/tun2/server.go b/internal/tun2/server.go index 3f72373..783d952 100644 --- a/internal/tun2/server.go +++ b/internal/tun2/server.go @@ -520,10 +520,13 @@ func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) { } ln.Log(ctx, c, ln.F{ - "action": "http_traffic", - "remote_addr": req.RemoteAddr, - "host": req.Host, - "uri": req.RequestURI, + "action": "http traffic", + "remote_addr": req.RemoteAddr, + "host": req.Host, + "uri": req.URL.Path, + "status": resp.Status, + "status_code": resp.StatusCode, + "content_length": resp.ContentLength, }) return resp, nil