引入lumberjack和fluentbit自动分发
This commit is contained in:
@@ -26,6 +26,7 @@ func NewGlobalServerConfig() *GlobalServerConfig {
|
||||
config.HTTPAccessLog.EnableResponseHeaders = true
|
||||
config.HTTPAccessLog.EnableCookies = true
|
||||
config.HTTPAccessLog.EnableServerNotFound = true
|
||||
config.HTTPAccessLog.Rotate = NewDefaultAccessLogRotateConfig()
|
||||
|
||||
config.Log.RecordServerError = false
|
||||
|
||||
@@ -79,6 +80,7 @@ type GlobalServerConfig struct {
|
||||
EnableServerNotFound bool `yaml:"enableServerNotFound" json:"enableServerNotFound"` // 记录服务找不到的日志
|
||||
WriteTargets *AccessLogWriteTargets `yaml:"writeTargets" json:"writeTargets"` // 写入目标:文件/MySQL/ClickHouse(双写/单写)
|
||||
FilePath string `yaml:"filePath" json:"filePath"` // 公用日志策略文件路径(用于节点侧复用)
|
||||
Rotate *AccessLogRotateConfig `yaml:"rotate" json:"rotate"` // 本地日志轮转配置(lumberjack)
|
||||
} `yaml:"httpAccessLog" json:"httpAccessLog"` // 访问日志配置
|
||||
|
||||
Stat struct {
|
||||
|
||||
Reference in New Issue
Block a user