This commit is contained in:
oneao committed 2025-08-11 17:29:58 +08:00
1 parent 7c8e2906bc
commit 72a1a9184a
25 files changed
+744 -125

No files matched your search

@@ -0,0 +1,15 @@
package middleware
import (
"base-framework/pkg/router"
"log"
"time"
)
func Logger() router.HandlerFunc {
return func(c *router.Context) {
start := time.Now()
c.Next()
log.Printf("[%s] %s in %v", c.Request.Method, c.Request.URL.Path, time.Since(start))
}
}