mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-08 00:15:19 +08:00
实现请求日志写入
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package serverconfigs
|
||||
|
||||
// 默认的访问日志配置
|
||||
var DefaultHTTPAccessLogRef = NewHTTPAccessLogRef()
|
||||
|
||||
// 代理访问日志配置
|
||||
type HTTPAccessLogRef struct {
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖
|
||||
@@ -73,3 +76,13 @@ func (this *HTTPAccessLogRef) ContainsStoragePolicy(storagePolicyId int64) bool
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 检查是否包含某个Field
|
||||
func (this *HTTPAccessLogRef) ContainsField(field int) bool {
|
||||
for _, f := range this.Fields {
|
||||
if f == field {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user