I'm developing python application which works on aws beanstalk environment. For error handling and debugging proposes I write logs to custom lof file on the directory /var/logs/.
What should I do in order to have ability snapshot logs from Elastic beanstalk management console?
By default you can see the django logs here
If you need have ability to snapshot log files from Beanstalk management console, you should just write you log files to "/opt/python/log/" folder. Elastic beanstalk scripts use this folder for log tailing.
Expanding on Vadim911 (and my own comment), I solved the problem using a config file in .ebextensions. Here is the python code:
Here is the .ebextensions config file code:
The contents of this file (along with other log files) is available using the Logs snapshot function on the AWS elastic beanstalk console.