Logging 中間件由 clevergo/middleware 提供。
import (
"github.com/clevergo/clevergo"
"github.com/clevergo/middleware"
)
m := middleware.Logging(os.Stdout)
// m := middleware.CombinedLogging(os.Stdout) // combined logging
router.Use(clevergo.WrapHH(m))
Logging 中間件由 clevergo/middleware 提供。
import (
"github.com/clevergo/clevergo"
"github.com/clevergo/middleware"
)
m := middleware.Logging(os.Stdout)
// m := middleware.CombinedLogging(os.Stdout) // combined logging
router.Use(clevergo.WrapHH(m))
本文档使用 BookStack 构建