Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am not able to locate the tomcat log files on ubuntu. I looked into /var/log/tomcat6 but the output are these file,

catalina.2012-11-23.log  catalina.out       localhost.2012-11-23.log
catalina.2012-11-24.log  catalina.out.1.gz  localhost.2012-11-24.log

Any idea which is the correct one?

share|improve this question
    
just try it to find using find command. here how to use: sudo find / -type f | grep tomcat| grep log Reply what happens.. –  Saur.K Sep 9 '13 at 11:38
add comment

2 Answers

I usually find any files using file command and filter the results using grep. It helps on many situation. For your case it is possible that your tomcat6 log file would be located in some other place.

So you can use following command to locate it, you would get few results then it would be easier to look the actual path:

sudo find / -type f | grep tomcat| grep log

For example if I want to find all the log files of apache2 then I have to execute this (I don't have tomcat installed, so giving apache2 example):

sudo find / -type f | grep apache2 | grep log

I got this:

/var/log/apache2/access.log.7.gz
/var/log/apache2/error.log.1
/var/log/apache2/error.log.9.gz
/var/log/apache2/error.log.3.gz
/var/log/apache2/access.log.1
/var/log/apache2/error.log.6.gz
/var/log/apache2/error.log.7.gz
/var/log/apache2/error.log
/var/log/apache2/error.log.2.gz
/var/log/apache2/error.log.5.gz
/var/log/apache2/access.log.2.gz
/var/log/apache2/access.log.4.gz
/var/log/apache2/access.log.9.gz
/var/log/apache2/error.log.8.gz
/var/log/apache2/error.log.4.gz
/var/log/apache2/access.log.6.gz
/var/log/apache2/other_vhosts_access.log
/var/log/apache2/access.log.8.gz
/var/log/apache2/access.log.5.gz
/var/log/apache2/access.log
/var/log/apache2/access.log.3.gz
/usr/lib/apache2/modules/mod_log_forensic.so
/usr/share/doc/apache2.2-bin/changelog.Debian.gz
/usr/share/doc/apache2-utils/changelog.Debian.gz
/etc/apache2/mods-available/log_forensic.load
/etc/apache2/conf.d/other-vhosts-access-log
/etc/logrotate.d/apache2

Now it is easier to locate all log of apache2 like error , access etc.. You can use more filter to cascade some more results..

Hope you would be able to locate your tomcat6 log file..

share|improve this answer
add comment

check this file catalina.out

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.