So I have an AWS EB environment with and application deployed.
I can't view the applications log output (web.stdout.logs is empty)
So I have an AWS EB environment with and application deployed.
I can't view the applications log output (web.stdout.logs is empty)
You can try by adding the following to your python.config
, or by creating new config file, e.g. mylogs.config
:
files:
"/opt/elasticbeanstalk/config/private/logtasks/bundle/applogs.conf" :
mode: "000755"
owner: root
group: root
content: |
/opt/python/log/*.log
The /opt/python/log/*.log
should be adjusted to your application.
The problem was not that I couldn't see the output, it was always in the /var/log/web.stdout.log file however when I was zipping the file to upload it to the EB environment I was zipping it using the file manager. This caused an issue on upload as the Procfile was being placed beside the application rather than inside of it. The effect looked like there were no log files, but really the application was just never getting passed to the Procfile.
The solution was
cd path/to/application
zip -r my_application_code.zip .
Now when I upload the zip file to the EB console the Procfile is generated correctly and the applications log files are found in web.stdout.log as normal.
Thanks for your help.