Reputation: 841
I've a Django application hosted in Docker elastic beanstalk. I need to save the django log file in the s3 bucket. We can retrieve the instance logs using the AWS console or using "eb logs" command.
But to retrieve the django logs we'he to manually ssh to the eb instance and check it.
If we enable the log rotation in eb configuration we can save the instance logs in the s3 bucket. But is there any similar ways to save django log inside the eb instance docker container to the s3 bucket.
Upvotes: 5
Views: 2354
Reputation: 1442
When using Docker, make sure you have this line in your Dockerrun.aws.json
file:
"Logging": "/var/log/eb"
Then write your Django logs in /var/log/eb/
. They'll be bundled and included when using the Elastic Beanstalk logs functionality.
Upvotes: 1