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)) } }