Skip to content

Commit

Permalink
Enable verbose flag for proxyRequest
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Oct 18, 2023
1 parent 7dc1b20 commit 8d5a98b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ func proxyRequest(w http.ResponseWriter, originalReq *http.Request, proxyClient
defer response.Body.Close()
}

log.Printf("%s took %f seconds\n", functionName, seconds.Seconds())
if verbose {
log.Printf("%s took %f seconds\n", functionName, seconds.Seconds())
}

clientHeader := w.Header()
copyHeaders(clientHeader, &response.Header)
Expand Down

0 comments on commit 8d5a98b

Please sign in to comment.