How do you manage your application logs in AWS elastic beanstalk? Which file you write you application logs to?
I\'m using the following Logging configuration in my d
There's a simple way that doesn't require any beanstalk configuration.
In your django settings under LOGGING set up a handler directed to the file '/opt/python/log/{log_file_name}'. The logs can then be accessed via the beanstalk environment menu under "Logs".
LOGGING = {
...,
'handlers': {
'logfile': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/opt/python/log/{log_file_name}',
},
},
'loggers': {
'debugger': {
'level': 'DEBUG',
'handlers': ['logfile'],
'propagate': False,
},
}
This location is stated in the documentation here:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html#health-logs-instancelocation