17 lines
280 B
Go
17 lines
280 B
Go
package middleware
|
|
|
|
import (
|
|
"base-framework/pkg/logx"
|
|
"base-framework/pkg/router"
|
|
"base-framework/pkg/routinex"
|
|
"base-framework/pkg/utils/uid"
|
|
)
|
|
|
|
func Logger() router.HandlerFunc {
|
|
return func(c *router.Context) {
|
|
routinex.Set(logx.TrackID, uid.NextID())
|
|
|
|
c.Next()
|
|
}
|
|
}
|