Skip to content

Commit

Permalink
Merge pull request #142 from HuiJing-C/master
Browse files Browse the repository at this point in the history
[fix] LocalFileConfigInputDetail Unmarshal error when use plugin
  • Loading branch information
shabicheng authored Nov 19, 2021
2 parents 0ddd1c7 + b436e8d commit 6671a18
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions log_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,32 +273,26 @@ func ConvertToDelimiterConfigInputDetail(detail InputDetailInterface) (*Delimite
// LocalFileConfigInputDetail all file input detail's basic config
type LocalFileConfigInputDetail struct {
CommonConfigInputDetail
LogType string `json:"logType"`
LogPath string `json:"logPath"`
FilePattern string `json:"filePattern"`
TimeFormat string `json:"timeFormat"`
TopicFormat string `json:"topicFormat,omitempty"`
Preserve bool `json:"preserve"`
PreserveDepth int `json:"preserveDepth"`
FileEncoding string `json:"fileEncoding,omitempty"`
DiscardUnmatch bool `json:"discardUnmatch"`
MaxDepth int `json:"maxDepth"`
TailExisted bool `json:"tailExisted"`
DiscardNonUtf8 bool `json:"discardNonUtf8"`
DelaySkipBytes int `json:"delaySkipBytes"`
IsDockerFile bool `json:"dockerFile"`
DockerIncludeLabel map[string]string `json:"dockerIncludeLabel,omitempty"`
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"`
LogType string `json:"logType"`
LogPath string `json:"logPath"`
FilePattern string `json:"filePattern"`
TimeFormat string `json:"timeFormat"`
TopicFormat string `json:"topicFormat,omitempty"`
Preserve bool `json:"preserve"`
PreserveDepth int `json:"preserveDepth"`
FileEncoding string `json:"fileEncoding,omitempty"`
DiscardUnmatch bool `json:"discardUnmatch"`
MaxDepth int `json:"maxDepth"`
TailExisted bool `json:"tailExisted"`
DiscardNonUtf8 bool `json:"discardNonUtf8"`
DelaySkipBytes int `json:"delaySkipBytes"`
IsDockerFile bool `json:"dockerFile"`
DockerIncludeLabel map[string]string `json:"dockerIncludeLabel,omitempty"`
DockerExcludeLabel map[string]string `json:"dockerExcludeLabel,omitempty"`
DockerIncludeEnv map[string]string `json:"dockerIncludeEnv,omitempty"`
DockerExcludeEnv map[string]string `json:"dockerExcludeEnv,omitempty"`
PluginDetail map[string]interface{} `json:"plugin,omitempty"`
Advanced map[string]interface{} `json:"advanced,omitempty"`
}

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

0 comments on commit 6671a18

Please sign in to comment.