Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4390c4d

Browse files
committed
added comment for chi ctx extraction
1 parent2212f08 commit4390c4d

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
ifchiCtx:=chi.RouteContext(ctx);chiCtx!=nil {
142143
urlParams:=chiCtx.URLParams
143144
routeParamsFields:=make([]slog.Field,0,len(urlParams.Keys))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp