Registry / logging / go-chi-httplog

go-chi-httplog

JSON →
library0.3.2gogounverified

httplog is a logging middleware for the Chi router.

go get github.com/go-chi/httplog
INSTALL
IMPORT
SIG · GO-CHI-HTTPLOG
G
go-chi-httplog
logginggov0.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

httplog
github.com/go-chi/httplog

Sets up request logging for a Chi router.

package main import ( "net/http" "github.com/go-chi/chi/v5" "github.com/go-chi/httplog" ) func main() { logger := httplog.NewLogger("myapp", httplog.Options{}) r := chi.NewRouter() r.Use(httplog.RequestLogger(logger)) r.Get("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello")) }) http.ListenAndServe(":3000", r) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
39 hits · last 30 days
node
38
OpenAI (training)
1
Resources
go-chi-httplog — go get go-chi-httplog · libregistry