File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ func (c *RequestLoggerContext) WriteLog(ctx context.Context, status int) {
90
90
c .written = true
91
91
end := time .Now ()
92
92
93
- c . WithFields (
93
+ logger := c . log . With (
94
94
slog .F ("took" , end .Sub (c .start )),
95
95
slog .F ("status_code" , status ),
96
96
slog .F ("latency_ms" , float64 (end .Sub (c .start )/ time .Millisecond )),
@@ -99,9 +99,9 @@ func (c *RequestLoggerContext) WriteLog(ctx context.Context, status int) {
99
99
// includes proxy errors etc. It also causes slogtest to fail
100
100
// instantly without an error message by default.
101
101
if status >= http .StatusInternalServerError {
102
- c . log .Warn (ctx , c .message )
102
+ logger .Warn (ctx , c .message )
103
103
} else {
104
- c . log .Debug (ctx , c .message )
104
+ logger .Debug (ctx , c .message )
105
105
}
106
106
}
107
107
You can’t perform that action at this time.
0 commit comments