Skip to content

Commit 8b98266

Browse files
committed
updated an example
1 parent 7279e2f commit 8b98266

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

javav2/example_code/cloudwatch/src/main/java/com/example/cloudwatch/CloudWatchReadLogs.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@
2727
public class CloudWatchReadLogs {
2828
public static void main(final String[] args) {
2929
final String usage = """
30-
Usage:
31-
<logGroupName>
32-
Where:
33-
logGroupName - The name of the log group (for example, /aws/lambda/ChatAIHandler).
34-
""";
35-
// if (args.length != 3) {
36-
// System.out.print(usage);
37-
// System.exit(1);
38-
// }
30+
Usage:
31+
<logGroupName>
32+
Where:
33+
logGroupName - The name of the log group (for example, /aws/lambda/ChatAIHandler).
34+
""";
35+
if (args.length != 3) {
36+
System.out.print(usage);
37+
System.exit(1);
38+
}
3939

40-
String logGroupName = "/aws/lambda/ChatAIHandler" ; //args[0];
40+
String logGroupName = args[0];
4141
CloudWatchLogsClient logsClient = CloudWatchLogsClient.builder()
4242
.region(Region.US_EAST_1)
4343
.build();

0 commit comments

Comments
 (0)