From 71d40e0c08c2ae4f3a4e9e67fbd3bdb28d042914 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Mon, 20 Dec 2021 20:34:43 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=8E=92=E9=99=A4=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E4=B8=AD=E6=96=AD=E5=AF=BC=E8=87=B4=E7=9A=84503?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20(#1343)"=20(#1351)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2cdf5e73958149f889630cb57ec7e0879c061aed. --- rest/handler/loghandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/handler/loghandler.go b/rest/handler/loghandler.go index 1c428982..57d147b8 100644 --- a/rest/handler/loghandler.go +++ b/rest/handler/loghandler.go @@ -185,7 +185,7 @@ func logBrief(r *http.Request, code int, timer *utils.ElapsedTimer, logs *intern buf.WriteString(fmt.Sprintf("\n%s", body)) } - if ok || r.Context().Err() == context.Canceled { + if ok { logger.Info(buf.String()) } else { logger.Error(buf.String())