fix(access_logger): fix stdout and path not working at the same time

This commit is contained in:
yusing
2025-11-01 12:07:22 +08:00
parent e3915210aa
commit 306cb7a20e
11 changed files with 383 additions and 39 deletions

View File

@@ -149,7 +149,7 @@ func logEntry() []byte {
res := httptest.NewRecorder()
// server the request
srv.Config.Handler.ServeHTTP(res, req)
b := accesslog.AppendRequestLog(nil, req, res.Result())
b := accesslog.(RequestFormatter).AppendRequestLog(nil, req, res.Result())
if b[len(b)-1] != '\n' {
b = append(b, '\n')
}