import "github.com/felixge/httpsnoop"

wrappedHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
  metrics := httpsnoop.CaptureMetrics(handler, w, r)
  slog.Info(fmt.Sprintf("%v %v", r.Method, r.URL), "code", metrics.Code)
})