I cannot locate production log files on Elastic Be

2020-08-26 04:04发布

问题:

I have deployed a Rails app to Elastic Beanstalk. I am trying to locate the production log files from the previous day. They are not present in the zipped bundle which can be downloaded from the AWS EB console. They are not present in the /var/log directory of the ec2 instance. in /var/app/support/logs there are only todays log files.

Is there anywhere else to look?

Is my EB environment configured incorrectly? If so, how do I correct the problem?

Thanks in advance for any hints or tips.

回答1:

All your system logs should be in /var/log you'll probably see .log.1 at the end of the log files, this is because they are rotated.

For your application, I'd look in: /var/app/support/logs, here you'll find logs for Passenger (if that's what your stack runs). You'll probably see something like this in that directory:

access.log
development.log
healthd/
passenger.log
production.log
rotated/

If you are using the NGINX and Puma stack (or other newly updated 2018 eb stacks), your appwill be running at: /var/app/current