logHTTPRequest logs a Debug message with the corresponding HTTP request details from the eyeball.
(logger *zerolog.Logger, r *http.Request)
| 58 | |
| 59 | // logHTTPRequest logs a Debug message with the corresponding HTTP request details from the eyeball. |
| 60 | func 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. |
| 70 | func logOriginHTTPResponse(logger *zerolog.Logger, resp *http.Response) { |