12

I have installed Tomcat 7 on an Amazon EC2 running Amazon Linux. I have installed a WAR file on tomcat and I am using java.util.logging for logging messages in my code. Now how to access those log messages in Amazon EC2?

1 Answer 1

13

The standard location for Tomcat log files is:

/var/log/tomcat
6
  • There is folder tomcat7 at the location you suggested but I cannot cd into it. How do I access log file? Jul 3, 2012 at 19:46
  • 2
    Try to su as root user first: su -, or use sudo before your commands, e.g.: sudo ls -al /var/log/tomcat7 to see the directory content. Jul 3, 2012 at 19:55
  • Thanks, it worked. If I may ask which file will have Log.log() from my Servlets. Jul 3, 2012 at 20:16
  • 2
    I would look in catalina.out first or one of the files starting with localhost. If you still don't find it, you can sort the files by date using ls -ltr to see the ones recently modified. Jul 3, 2012 at 20:20
  • I have asked a related question here superuser.com/questions/444572/… Jul 3, 2012 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .