1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:40:57 +00:00
Beego/core/logs/alils/log_config.go

43 lines
1.3 KiB
Go
Raw Normal View History

2020-07-22 14:50:08 +00:00
package alils
2020-08-06 15:07:18 +00:00
// InputDetail defines log detail
2020-07-22 14:50:08 +00:00
type InputDetail struct {
LogType string `json:"logType"`
LogPath string `json:"logPath"`
FilePattern string `json:"filePattern"`
LocalStorage bool `json:"localStorage"`
TimeFormat string `json:"timeFormat"`
LogBeginRegex string `json:"logBeginRegex"`
Regex string `json:"regex"`
Keys []string `json:"key"`
FilterKeys []string `json:"filterKey"`
FilterRegex []string `json:"filterRegex"`
TopicFormat string `json:"topicFormat"`
}
2020-08-06 15:07:18 +00:00
// OutputDetail defines the output detail
2020-07-22 14:50:08 +00:00
type OutputDetail struct {
Endpoint string `json:"endpoint"`
LogStoreName string `json:"logstoreName"`
}
2020-08-06 15:07:18 +00:00
// LogConfig defines Log Config
2020-07-22 14:50:08 +00:00
type LogConfig struct {
Name string `json:"configName"`
InputType string `json:"inputType"`
InputDetail InputDetail `json:"inputDetail"`
OutputType string `json:"outputType"`
OutputDetail OutputDetail `json:"outputDetail"`
CreateTime uint32
LastModifyTime uint32
project *LogProject
}
// GetAppliedMachineGroup returns applied machine group of this config.
func (c *LogConfig) GetAppliedMachineGroup(confName string) (groupNames []string, err error) {
groupNames, err = c.project.GetAppliedMachineGroups(c.Name)
return
}