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"` // 运行日志配置