Skip to content

Commit aae80a6

Browse files
authored
add error message into log and fix a typo (#18543)
1 parent 7c3e38d commit aae80a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x-pack/filebeat/input/s3/input.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type object struct {
8787
Key string `json:"key"`
8888
}
8989

90-
type s3BucketOjbect struct {
90+
type s3BucketObject struct {
9191
bucket `json:"bucket"`
9292
object `json:"object"`
9393
}
@@ -97,7 +97,7 @@ type sqsMessage struct {
9797
EventSource string `json:"eventSource"`
9898
AwsRegion string `json:"awsRegion"`
9999
EventName string `json:"eventName"`
100-
S3 s3BucketOjbect `json:"s3"`
100+
S3 s3BucketObject `json:"s3"`
101101
} `json:"Records"`
102102
}
103103

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

0 commit comments

Comments
 (0)