From d1759fdfa9709374f81a3df390a7c8532b308e15 Mon Sep 17 00:00:00 2001
From: Nick Craig-Wood <nick@craig-wood.com>
Date: Mon, 31 Oct 2016 12:01:28 +0000
Subject: [PATCH] Add request ID to HTTP debugging to make it easier to trace
 concurrent flows

---
 fs/http.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/http.go b/fs/http.go
index ffc005b98..accd9f41f 100644
--- a/fs/http.go
+++ b/fs/http.go
@@ -188,7 +188,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
 	if t.logHeader || t.logBody {
 		buf, _ := httputil.DumpRequestOut(req, t.logBody)
 		Debug(nil, "%s", separatorReq)
-		Debug(nil, "%s", "HTTP REQUEST")
+		Debug(nil, "%s (req %p)", "HTTP REQUEST", req)
 		Debug(nil, "%s", string(buf))
 		Debug(nil, "%s", separatorReq)
 	}
@@ -197,7 +197,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
 	// Log response
 	if t.logHeader || t.logBody {
 		Debug(nil, "%s", separatorResp)
-		Debug(nil, "%s", "HTTP RESPONSE")
+		Debug(nil, "%s (req %p)", "HTTP RESPONSE", req)
 		if err != nil {
 			Debug(nil, "Error: %v", err)
 		} else {