From 90a0b13aa336b51a27dab83f27c548498c145713 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 1 Jan 2023 19:27:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E7=BE=A4=E6=9C=8D=E5=8A=A1=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0=E6=80=A7=E8=83=BD=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/global_server_config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/serverconfigs/global_server_config.go b/pkg/serverconfigs/global_server_config.go index eef17b2..65e8892 100644 --- a/pkg/serverconfigs/global_server_config.go +++ b/pkg/serverconfigs/global_server_config.go @@ -8,6 +8,7 @@ func DefaultGlobalServerConfig() *GlobalServerConfig { config.HTTPAccessLog.EnableResponseHeaders = true config.HTTPAccessLog.EnableCookies = true config.Log.RecordServerError = false + config.Performance.AutoWriteTimeout = true return config } @@ -28,6 +29,11 @@ type GlobalServerConfig struct { EnableCookies bool `yaml:"enableCookies" json:"enableCookies"` // 记录Cookie } `yaml:"httpAccessLog" json:"httpAccessLog"` // 访问日志配置 + Performance struct { + Debug bool `yaml:"debug" json:"debug"` // Debug模式 + AutoWriteTimeout bool `yaml:"autoWriteTimeout" json:"autoWriteTimeout"` // 是否自动写超时 + } `yaml:"performance" json:"performance"` // 性能 + Log struct { RecordServerError bool `yaml:"recordServerError" json:"recordServerError"` // 记录服务错误到运行日志 } `yaml:"log" json:"log"` // 运行日志配置