Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Tomcat application log files stored in Elastic Beanstalk?

Where does Elastic Beanstalk store log output from Tomcat on each EC2 instance?

I've configured SSH and want to tail the log file, but don't know where it's located.

like image 438
Ken Liu Avatar asked Apr 02 '12 16:04

Ken Liu


2 Answers

Something seems to have changed a bit on this, as I have a new Elastic Beanstalk application where the logs are located in:

/var/log/tomcat7/

Note that the easiest way to view stuff in here is to sudo su first, as this directory is owned by root. Whereas, I have an older instance where the logs are in:

/opt/tomcat7/logs/

I'm not sure why there is a disparity in this, as both applications use the tomcat7 container, but this seems to be the state of things to date.

like image 163
Paul Sanwald Avatar answered Nov 01 '22 03:11

Paul Sanwald


By default, AWS Elastic Beanstalk log output from Tomcat is written to /opt/tomcat7/logs/tail_catalina.out. (depends on Tomcat version)

These log messages are written by java.util.logging configured in Tomcat from /opt/tomcat7/conf.

edit: this was changed in late 2012 and now applies only to "Legacy" containers.

like image 28
Ken Liu Avatar answered Nov 01 '22 04:11

Ken Liu