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
The standard location for Tomcat log files is:
/var/log/tomcat
-
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 -
2Try 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 -
2I would look in
catalina.out
first or one of the files starting withlocalhost
. If you still don't find it, you can sort the files by date usingls -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