Skip to content

Commit

Permalink
Merge pull request #71 from daniloarcidiacono/70-cloudwatch-duplicate…
Browse files Browse the repository at this point in the history
…-logs

Fix CloudWatch internal appenders.
  • Loading branch information
sndyuk authored Mar 14, 2023
2 parents 2b2b38d + 9b05edd commit b9b7f43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,11 @@ public boolean append(List<InputLogEvent> events) {
request = new PutLogEventsRequest(logGroupName, streamName, events.subList(putIndex, i + 1));
} else {
request = new PutLogEventsRequest(logGroupName, streamName, events.subList(putIndex, i));
// Update putIndex before decreasing the event index
putIndex = i;
i -= 1;
}
size = 0;
putIndex = i;
if (sequenceToken != null) {
request.withSequenceToken(sequenceToken);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ public boolean append(List<InputLogEvent> events) {
} else {
request = PutLogEventsRequest.builder().logGroupName(logGroupName)
.logStreamName(streamName).logEvents(events.subList(putIndex, i));
// Update putIndex before decreasing the event index
putIndex = i;
i -= 1;
}
size = 0;
putIndex = i;
if (sequenceToken != null) {
request.sequenceToken(sequenceToken);
}
Expand Down

0 comments on commit b9b7f43

Please sign in to comment.