mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
228 B
Go
15 lines
228 B
Go
1 year ago
|
package middlewares
|
||
|
|
||
|
import (
|
||
|
"github.com/gin-gonic/gin"
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
func NewLog(l *logrus.Logger) gin.HandlerFunc {
|
||
|
return func(ctx *gin.Context) {
|
||
|
ctx.Set("log", &logrus.Entry{
|
||
|
Logger: l,
|
||
|
})
|
||
|
}
|
||
|
}
|