Skip to content

Commit f273bfe

Browse files
committed
update log reader to use LogGroupIdentifier for log group name
1 parent 24ee63d commit f273bfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

logprocesser/logreader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func MonitorLogGroup(ctx context.Context, client *cloudwatchlogs.Client, logGrou
115115
func fetchLogStreams(ctx context.Context, client *cloudwatchlogs.Client, logGroupName string, nextToken *string) ([]types.LogStream, *string, error) {
116116
// starting from the oldest logs
117117
output, err := client.DescribeLogStreams(ctx, &cloudwatchlogs.DescribeLogStreamsInput{
118-
LogGroupName: aws.String(logGroupName),
118+
LogGroupIdentifier: aws.String(logGroupName),
119119
OrderBy: types.OrderByLastEventTime,
120120
Descending: aws.Bool(false),
121121
Limit: aws.Int32(int32(cloudwatchReadBatchSize)), // Adjust based on expected stream count
@@ -131,7 +131,7 @@ func fetchLogStreams(ctx context.Context, client *cloudwatchlogs.Client, logGrou
131131
// processLogStream reads and processes logs from a specific log stream using nextToken for pagination.
132132
func processLogStream(ctx context.Context, client *cloudwatchlogs.Client, logGroupName, streamName string, tracker *StreamTracker) error {
133133
output, err := client.GetLogEvents(ctx, &cloudwatchlogs.GetLogEventsInput{
134-
LogGroupName: aws.String(logGroupName),
134+
LogGroupIdentifier: aws.String(logGroupName),
135135
LogStreamName: aws.String(streamName),
136136
NextToken: tracker.NextToken,
137137
StartFromHead: aws.Bool(true),

0 commit comments

Comments
 (0)