mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-02-03 00:41:10 +08:00
remove too much log print
This commit is contained in:
parent
3e76566917
commit
c9b8e966c4
1 changed files with 2 additions and 3 deletions
|
|
@ -7,7 +7,6 @@ package touka
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"log"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -148,7 +147,7 @@ func defaultErrorWarp(handler ErrorHandler) ErrorHandler {
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
if c.Writer.Written() {
|
if c.Writer.Written() {
|
||||||
log.Printf("errpage: response already started for status %d, skipping error page rendering, err: %v", code, err)
|
c.Debugf("errpage: response already started for status %d, skipping error page rendering, err: %v", code, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -163,7 +162,7 @@ func defaultErrorWarp(handler ErrorHandler) ErrorHandler {
|
||||||
// 避免在客户端已关闭连接后写入响应导致的问题
|
// 避免在客户端已关闭连接后写入响应导致的问题
|
||||||
// 检查 context.Context 是否已取消
|
// 检查 context.Context 是否已取消
|
||||||
if errors.Is(c.Request.Context().Err(), context.Canceled) {
|
if errors.Is(c.Request.Context().Err(), context.Canceled) {
|
||||||
log.Printf("errpage: client disconnected, skipping error page rendering for status %d, err: %v", code, err)
|
c.Debugf("errpage: client disconnected, skipping error page rendering for status %d, err: %v", code, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue