README ¶ gin-logrus Logrus logger middleware for Gin Usage import ( "github.com/Sirupsen/logrus" "github.com/toorop/gin-logrus" "github.com/gin-gonic/gin" log := logrus.New() // hooks, config,... r := gin.New() r.Use(ginlogrus.Logger(log), gin.Recovery()) // pingpong r.GET("/ping", func(c *gin.Context) { c.Data(200, "text/plain", []byte("pong")) }) r.Run("127.0.0.1:8080") Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func Logger(log *logrus.Logger) gin.HandlerFunc Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Logger ¶ func Logger(log *logrus.Logger) gin.HandlerFunc Logger is the logrus logger handler Types ¶ This section is empty. Source Files ¶ View all Source files logger.go Click to show internal directories. Click to hide internal directories.