question

KUNAL avatar image
KUNAL asked

How to see logs

Hello, I am following ASK Java code samples on GitHub. How can I see log statements within callbacks such as onIntent: @Override public SpeechletResponse onIntent(final IntentRequest request, final Session session) throws SpeechletException { log.info("onIntent requestId={}, sessionId={}", request.getRequestId(), session.getSessionId()); When I navigate to CloudWatch->Logs I see Logs Groups. I can see my Skill there but I can't see any logs. Also, I have noticed that logs are not updated even after clicking on the refresh UI button. Here the pom.xml: log4j log4j 1.2.17 compile And here's srs/main/resources/log4j.properties: #Define the LAMBDA appender log4j.appender.LAMBDA=com.amazonaws.services.lambda.runtime.log4j.LambdaAppender log4j.appender.LAMBDA.layout=org.apache.log4j.PatternLayout log4j.appender.LAMBDA.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} <%X{AWSRequestId}> %-5p %c{1}:%L - %m%n
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Ross@Amazon avatar image
Ross@Amazon answered
The simplest way to view the logs from your Lambda functions is by navigating to the Monitoring tab on the Lambda function that you would like to view. From there click on the "View logs in CloudWatch" link. That will take you to the CloudWatch logs generated exclusively from that function, listed in chronological order. Just click on a log set to view its details.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.