From ddfdd8cc17905f3c6d904a8f009f8e9971aa4952 Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 17 Jan 2024 23:20:06 -0600 Subject: [PATCH] Log dumped filename --- helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpers.go b/helpers.go index 2e9aac7..dcfbe22 100644 --- a/helpers.go +++ b/helpers.go @@ -277,6 +277,7 @@ func GuessExtension(contentType string) string { } return "" } + // DumpResponse dumps a response body to a file for debugging purposes func DumpResponse(res *http.Response) { contentType := res.Header.Get("Content-Type") @@ -297,4 +298,6 @@ func DumpResponse(res *http.Response) { log.Err(err).Msg("Error copying response body") return } + + log.Info().Str("filename", filename).Str("content-type", contentType).Msg("Dumped response body") }