Gin middleware for Logging with zerolog.
Download and install it:
$ go get github.com/easonlin404/gin-zerolog
Import it in your code:
import "github.com/easonlin404/gin-zerolog"
package main
import (
"github.com/easonlin404/gin-zerolog"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.Default()
r.Use(ginzerolog.Logger())
r.GET("/", func(c *gin.Context) {
// your code
})
r.Run()
}