A zerolog Logger/Recoverer middleware for chi.
go get -u github.com/Lavalier/zchi
package main
import (
"net/http"
"github.com/Lavalier/zchi"
"github.com/go-chi/chi/v5"
"github.com/rs/zerolog/log"
)
func main() {
r := chi.NewRouter()
r.Use(zchi.Logger(log.Logger))
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("test"))
})
http.ListenAndServe(":8080", r)
}