Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logtail config missing fields #140

Merged
merged 1 commit into from
Nov 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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