Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "log" in Amazon Beanstalk?

I've deployed an application and enabled cloudwatch. The issue is that stderr from the application running is not displayed in cloudwatch? How am I supposed to view the logs generated by my app? All I see are the logs from the builder and nginx/proxy in front of my app.

/aws/elasticbeanstalk/Default-Environment/var/log/eb-activity.log
/aws/elasticbeanstalk/Default-Environment/var/log/nginx/access.log
/aws/elasticbeanstalk/Default-Environment/var/log/nginx/error.log
like image 400
Books Avatar asked Dec 05 '25 18:12

Books


1 Answers

Go logging is broken on beanstalk. THat's because cloudwatch doesn't collect the web logs (i.e. web-1.error.log) . You can see it on aws docs...it collects only the ebl and nginx/proxy logs. As this great cloud is not open source nobody but Amazon can ever fix it(if they decide to do so).

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html

like image 158
Books Avatar answered Dec 08 '25 11:12

Books



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!