(reqID string, r *http.Request)
| 11 | ) |
| 12 | |
| 13 | func 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 | |
| 27 | func LogResponse( |
| 28 | reqID string, |