Skip to content

Commit 3b08c20

Browse files
committed
Log controller name with request logs
1 parent 6a2606d commit 3b08c20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func (ctrl *Controller) MuxHandler(name string, hdlr Handler, unm Unmarshaler) M
269269
for i := range chain {
270270
middleware = chain[ml-i-1](middleware)
271271
}
272-
baseCtx := LogWith(ctrl.Context, "action", name)
272+
baseCtx := LogWith(ctrl.Context, "ctrl", ctrl.Name, "action", name)
273273
return func(rw http.ResponseWriter, req *http.Request, params url.Values) {
274274
// Build context
275275
ctx := NewContext(baseCtx, rw, req, params)

0 commit comments

Comments
 (0)