Skip to content

Commit a97dc93

Browse files
committed
Fix: put host only for CloudTrail with correct priority
1 parent 5cd4eb4 commit a97dc93

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • aws/logs_monitoring_go/internal/handling

aws/logs_monitoring_go/internal/handling/s3.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ func (h S3Handler) processRecord(ctx context.Context, client S3APIClient, out ch
9494
}
9595

9696
if isCloudTrail {
97-
entry.Host = cloudtrailHost(message)
97+
entry.Host = cmp.Or(h.cfg.Host, cloudtrailHost(message))
9898
}
99-
entry.Host = cmp.Or(h.cfg.Host, entry.Host)
10099
entry.Message = h.cfg.Scrubber.Scrub(entry.Message)
101100
if err := concurrent.SafeSender(ctx, out, entry); err != nil {
102101
return err

0 commit comments

Comments
 (0)