Skip to content

Commit

Permalink
Merge pull request #140 from HuiJing-C/master
Browse files Browse the repository at this point in the history
[add] logtail config missing fields
  • Loading branch information
shabicheng authored Nov 18, 2021
2 parents c667b3f + ba2abd8 commit 62909a9
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions log_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ func ConvertToApsaraLogConfigInputDetail(detail InputDetailInterface) (*ApsaraLo
// RegexConfigInputDetail regex log config
type RegexConfigInputDetail struct {
LocalFileConfigInputDetail
Key []string `json:"key"`
LogBeginRegex string `json:"logBeginRegex"`
Regex string `json:"regex"`
Key []string `json:"key"`
LogBeginRegex string `json:"logBeginRegex"`
Regex string `json:"regex"`
CustomizedFields string `json:"customizedFields,omitempty"`
}

// InitRegexConfigInputDetail ...
Expand Down Expand Up @@ -221,11 +222,12 @@ func ConvertToJSONConfigInputDetail(detail InputDetailInterface) (*JSONConfigInp
// DelimiterConfigInputDetail delimiter log config
type DelimiterConfigInputDetail struct {
LocalFileConfigInputDetail
Separator string `json:"separator"`
Quote string `json:"quote"`
Key []string `json:"key"`
TimeKey string `json:"timeKey"`
AutoExtend bool `json:"autoExtend"`
Separator string `json:"separator"`
Quote string `json:"quote"`
Key []string `json:"key"`
TimeKey string `json:"timeKey"`
AutoExtend bool `json:"autoExtend"`
AcceptNoEnoughKeys bool `json:"acceptNoEnoughKeys"`
}

// InitDelimiterConfigInputDetail ...
Expand Down Expand Up @@ -289,6 +291,14 @@ type LocalFileConfigInputDetail struct {
DockerExcludeLabel map[string]string `json:"dockerExcludeLabel,omitempty"`
DockerIncludeEnv map[string]string `json:"dockerIncludeEnv,omitempty"`
DockerExcludeEnv map[string]string `json:"dockerExcludeEnv,omitempty"`
PluginDetail string `json:"plugin,omitempty"`
Advanced Advanced `json:"advanced"`
}

type Advanced struct {
ForceMultiConfig bool `json:"force_multiconfig,omitempty"`
BlackList map[string][]string `json:"blacklist,omitempty"`
Others string `json:"other,omitempty"`
}

func GetFileConfigInputDetailType(detail InputDetailInterface) (string, bool) {
Expand Down

0 comments on commit 62909a9

Please sign in to comment.