Skip to content

Commit

Permalink
add error message into log and fix a typo (#18543)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyan-sheng authored May 15, 2020
1 parent 7c3e38d commit aae80a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/filebeat/input/s3/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type object struct {
Key string `json:"key"`
}

type s3BucketOjbect struct {
type s3BucketObject struct {
bucket `json:"bucket"`
object `json:"object"`
}
Expand All @@ -97,7 +97,7 @@ type sqsMessage struct {
EventSource string `json:"eventSource"`
AwsRegion string `json:"awsRegion"`
EventName string `json:"eventName"`
S3 s3BucketOjbect `json:"s3"`
S3 s3BucketObject `json:"s3"`
} `json:"Records"`
}

Expand Down Expand Up @@ -534,7 +534,7 @@ func (p *s3Input) decodeJSONWithKey(decoder *json.Decoder, objectHash string, s3
}
} else if err != nil {
// decode json failed, skip this log file
p.logger.Warnf(fmt.Sprintf("Decode json failed for '%s', skipping this file", s3Info.key))
p.logger.Warnf(fmt.Sprintf("Decode json failed for '%s', skipping this file: %s", s3Info.key, err))
return nil
}

Expand Down

0 comments on commit aae80a6

Please sign in to comment.