Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.13 KB

README.md

File metadata and controls

50 lines (33 loc) · 1.13 KB

Gin-Zerolog

Gin middleware for Logging with zerolog.

Travis branch Codecov branch Go Report Card GoDoc

Usage

Start using it

Download and install it:

$ go get github.com/easonlin404/gin-zerolog

Import it in your code:

import "github.com/easonlin404/gin-zerolog"

Canonical example:

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()
}