MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / LogRequest

Function LogRequest

server/logging.go:13–25  ·  view source on GitHub ↗
(reqID string, r *http.Request)

Source from the content-addressed store, hash-verified

11)
12
13func LogRequest(reqID string, r *http.Request) {
14 path := r.RequestURI
15
16 clientIP, _, _ := net.SplitHostPort(r.RemoteAddr)
17
18 //nolint:gosec
19 slog.Info(
20 fmt.Sprintf("Started %s", path),
21 "request_id", reqID,
22 "method", r.Method,
23 "client_ip", clientIP,
24 )
25}
26
27func LogResponse(
28 reqID string,

Callers 1

ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected