From ba2abd84c69c13ae1b4cd08faa23d239b5eade3a Mon Sep 17 00:00:00 2001 From: wb-cjh663673 Date: Thu, 18 Nov 2021 11:41:56 +0800 Subject: [PATCH] add logtail config missing fields --- log_config.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/log_config.go b/log_config.go index a9fd3101..396fc503 100644 --- a/log_config.go +++ b/log_config.go @@ -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 ... @@ -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 ... @@ -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) {