// MiddlewareFunc makes RequestLogMiddleware implement the Middleware interface.
MiddlewareFunc makes RequestLogMiddleware implement the Middleware interface.
// MiddlewareFunc makes RequestLogMiddleware implement the Middleware interface .
func (mw *RequestLogMiddleware) MiddlewareFunc(h rest.HandlerFunc) rest.HandlerFunc {
	return func(w rest.ResponseWriter, r *rest.Request) {
		l := log.New(log.Ctx{})
		ctx := context.WithValue(r.Context(), ReqLog, l)
		r = &rest.Request{
			Request:    r.WithContext(ctx),
			PathParams: r.PathParams,
			Env:        r.Env,
		}
		h(w, r)
	}
}
func ( mw * RequestLogMiddleware ) MiddlewareFunc ( h rest . HandlerFunc ) rest . HandlerFunc { return func ( w rest . ResponseWriter , r * rest . Request ) { l := log . New ( log . Ctx { } ) ctx := context . WithValue ( r . Context ( ) , ReqLog , l ) r = & rest . Request { Request : r . WithContext ( ctx ) , PathParams : r . PathParams , Env : r . Env , } h ( w , r ) } }
MiddlewareFunc makes RequestLogMiddleware implement the Middleware interface.
MiddlewareFunc makes RequestLogMiddleware implement the Middleware interface .