1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 06:50:55 +00:00
Beego/logs/alils/log_config.go

43 lines
1.3 KiB
Go
Raw Normal View History

2016-12-27 01:58:42 +00:00
package alils
2017-04-30 14:41:23 +00:00
// InputDetail define log detail
2016-12-27 01:58:42 +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"`
}
2017-04-30 14:41:23 +00:00
// OutputDetail define the output detail
2016-12-27 01:58:42 +00:00
type OutputDetail struct {
Endpoint string `json:"endpoint"`
LogStoreName string `json:"logstoreName"`
}
2017-04-30 14:41:23 +00:00
// LogConfig define Log Config
2016-12-27 01:58:42 +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
}