From 391a332d4fee390bf25eb384773dd0dbdc850497 Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Fri, 15 May 2020 07:36:51 -0600 Subject: [PATCH] add error message into log and fix a typo (#18543) (cherry picked from commit aae80a612dae3fd8643dd8c922d5ce13bf75cc8c) --- x-pack/filebeat/input/s3/input.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/filebeat/input/s3/input.go b/x-pack/filebeat/input/s3/input.go index e4f6f792686c..84818f946809 100644 --- a/x-pack/filebeat/input/s3/input.go +++ b/x-pack/filebeat/input/s3/input.go @@ -87,7 +87,7 @@ type object struct { Key string `json:"key"` } -type s3BucketOjbect struct { +type s3BucketObject struct { bucket `json:"bucket"` object `json:"object"` } @@ -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"` } @@ -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 }