引入lumberjack和fluentbit自动分发

This commit is contained in:
robin
2026-02-13 22:36:17 +08:00
parent c6da67db79
commit e9093baffb
47 changed files with 4589 additions and 317 deletions

View File

@@ -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 {