Chi logrus-logger middleware
logrus-logger is a request logging middleware for Chi using Logrus logging library
Import using:
import "github.com/chi-middleware/logrus-logger"
Use middleware with default (Info) logging level:
log := logrus.New()
r := chi.NewRouter()
r.Use(logger.Logger("router", log))
or
Use middleware with Debug logging level:
log := logrus.New()
log.SetLevel(logrus.TraceLevel)
r := chi.NewRouter()
r.Use(logger.LoggerWithLevel("router", log, logrus.DebugLevel))