summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy/streaming_test.go
diff options
context:
space:
mode:
authorMatt Holt <mholt@users.noreply.github.com>2023-10-11 13:36:20 -0600
committerGitHub <noreply@github.com>2023-10-11 13:36:20 -0600
commit3a3182fba3eb20c45dce3efd9eb2856288a5ae04 (patch)
treebba97c2f5d10d86a54ff4c891a8adc2563b3f581 /modules/caddyhttp/reverseproxy/streaming_test.go
parente8b8d4a8cdf116bf05345443e37a21ea7a37b8bb (diff)
reverseproxy: Add more debug logs (#5793)
* reverseproxy: Add more debug logs This makes debug logging very noisy when reverse proxying, but I guess that's the point. This has shown to be useful in troubleshooting infrastructure issues. * Update modules/caddyhttp/reverseproxy/streaming.go Co-authored-by: Francis Lavoie <lavofr@gmail.com> * Update modules/caddyhttp/reverseproxy/streaming.go Co-authored-by: Francis Lavoie <lavofr@gmail.com> * Add opt-in `trace_logs` option * Rename to VerboseLogs --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Diffstat (limited to 'modules/caddyhttp/reverseproxy/streaming_test.go')
-rw-r--r--modules/caddyhttp/reverseproxy/streaming_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/streaming_test.go b/modules/caddyhttp/reverseproxy/streaming_test.go
index 919538f..3f6da2f 100644
--- a/modules/caddyhttp/reverseproxy/streaming_test.go
+++ b/modules/caddyhttp/reverseproxy/streaming_test.go
@@ -5,6 +5,8 @@ import (
"net/http/httptest"
"strings"
"testing"
+
+ "github.com/caddyserver/caddy/v2"
)
func TestHandlerCopyResponse(t *testing.T) {
@@ -22,7 +24,7 @@ func TestHandlerCopyResponse(t *testing.T) {
for _, d := range testdata {
src := bytes.NewBuffer([]byte(d))
dst.Reset()
- err := h.copyResponse(recorder, src, 0)
+ err := h.copyResponse(recorder, src, 0, caddy.Log())
if err != nil {
t.Errorf("failed with error: %v", err)
}