Registry / logging / gin-contrib-zap

gin-contrib-zap

JSON →
library1.1.7gogounverified

Package ginzap provides log handling using the zap package, structured similarly to the ginrus package.

go get github.com/gin-contrib/zap
INSTALL
IMPORT
SIG · GIN-CONTRIB-ZAP
G
gin-contrib-zap
logginggov1.1.7
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.

zap
github.com/gin-contrib/zap

Integrates zap logging into a Gin web server.

package main import ( "github.com/gin-gonic/gin" ginzap "github.com/gin-contrib/zap" "go.uber.org/zap" ) func main() { r := gin.Default() logger, _ := zap.NewProduction() r.Use(ginzap.Ginzap(logger, "2006-01-02T15:04:05Z07:00", true)) r.GET("/ping", func(c *gin.Context) { c.JSON(200, gin.H{"message": "pong"}) }) r.Run() }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
39 hits · last 30 days
node
34
OpenAI (training)
1
Resources
gin-contrib-zap — go get gin-contrib-zap · libregistry