How to view server logs for lightsail containers

0

Hello,

How can I view the server logs for my lightsail containers? I don't mean the access log I mean debug logging with Psr\Log\LoggerInterface.

Thank you!

질문됨 일 년 전1375회 조회
1개 답변
5

The following article may help you to access container server logs

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-viewing-container-service-container-logs

AWS LightSail does not directly support the viewing of logs from your containers. However, you can set up logging in your application and then access those logs.

One possible approach is to log your application data to stdout and stderr. Many Docker base images (including official images for languages like Node.js, Python, Ruby, etc.) are set up to log information to these output streams by default. AWS Lightsail containers will capture stdout and stderr from your container and make it available in the AWS Management Console and the Lightsail API.

profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠