judas-logger
logger gin+zap customize
Usage
Start using it
Download and install it:
$ go get github.com/judascrow/logger
Import it in your code:
import "github.com/judascrow/logger"
Example
See the example.
package main
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/judascrow/logger"
)
func main() {
r := gin.New()
r.Use(logger.LoggerZap())
// Example ping request.
r.GET("/test", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"success": true,
"message": "API is Online",
})
})
// Listen and Server in 0.0.0.0:8080
r.Run(":8080")
}