Content-Length: 257167 | pFad | http://github.com/coder/coder/commit/8ef56461165eb68835896cde7b0aa13d783ea26f

7B added comment for chi ctx extraction · coder/coder@8ef5646 · GitHub
Skip to content

Commit 8ef5646

Browse files
committed
added comment for chi ctx extraction
1 parent d1ee48e commit 8ef5646

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

coderd/httpmw/loggermw/logger.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ func (c *SlogRequestLogger) WriteLog(ctx context.Context, status int) {
138138
slog.F("latency_ms", float64(end.Sub(c.start)/time.Millisecond)),
139139
)
140140

141+
// If the request is routed, add the route parameters to the log.
141142
if chiCtx := chi.RouteContext(ctx); chiCtx != nil {
142143
urlParams := chiCtx.URLParams
143144
routeParamsFields := make([]slog.Field, 0, len(urlParams.Keys))

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/coder/coder/commit/8ef56461165eb68835896cde7b0aa13d783ea26f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy