Skip to content

Commit c2a8cc0

Browse files
committed
linting fixes
1 parent 3034484 commit c2a8cc0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

coderd/httpmw/logger.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ func Logger(log slog.Logger) func(next http.Handler) http.Handler {
5757
// We already capture most of this information in the span (minus
5858
// the response body which we don't want to capture anyways).
5959
tracing.RunWithoutSpan(r.Context(), func(ctx context.Context) {
60-
// logLevelFn(ctx, r.Method)
61-
logContext.WriteLog(r.Context(), sw.Status)
60+
logContext.WriteLog(ctx, sw.Status)
6261
})
6362
})
6463
}
@@ -100,9 +99,9 @@ func (c *RequestLoggerContext) WriteLog(ctx context.Context, status int) {
10099
// includes proxy errors etc. It also causes slogtest to fail
101100
// instantly without an error message by default.
102101
if status >= http.StatusInternalServerError {
103-
c.log.Error(ctx, c.message, "status_code", status)
102+
c.log.Error(ctx, c.message)
104103
} else {
105-
c.log.Debug(ctx, c.message, "status_code", status)
104+
c.log.Debug(ctx, c.message)
106105
}
107106
}
108107

File renamed without changes.

0 commit comments

Comments
 (0)