MCPcopy
hub / github.com/cloudflare/cloudflared / logHTTPRequest

Function logHTTPRequest

proxy/logger.go:60–67  ·  view source on GitHub ↗

logHTTPRequest logs a Debug message with the corresponding HTTP request details from the eyeball.

(logger *zerolog.Logger, r *http.Request)

Source from the content-addressed store, hash-verified

58
59// logHTTPRequest logs a Debug message with the corresponding HTTP request details from the eyeball.
60func logHTTPRequest(logger *zerolog.Logger, r *http.Request) {
61 logger.Debug().
62 Str("host", r.Host).
63 Str("path", r.URL.Path).
64 Interface("headers", r.Header).
65 Int64("content-length", r.ContentLength).
66 Msgf("%s %s %s", r.Method, r.URL, r.Proto)
67}
68
69// logOriginHTTPResponse logs a Debug message of the origin response.
70func logOriginHTTPResponse(logger *zerolog.Logger, resp *http.Response) {

Callers 1

ProxyHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected