Draft: big refactor
This commit is contained in:
18
server/middlewares/accessLog.go
Normal file
18
server/middlewares/accessLog.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package middlewares
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"gitea.konchin.com/ytshih/inp2025/game/tracing"
|
||||
"github.com/uptrace/bunrouter"
|
||||
)
|
||||
|
||||
func (self *Handlers) AccessLog(
|
||||
next bunrouter.HandlerFunc,
|
||||
) bunrouter.HandlerFunc {
|
||||
return func(w http.ResponseWriter, req bunrouter.Request) error {
|
||||
tracing.Logger.
|
||||
Info(req.Method + " " + req.Params().Route())
|
||||
return next(w, req)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user