Where does tomcat6 put logs by default? catalina.out seems to contain startup/shutdown information in /var/lib/tomcat6/logs, but standard out is either being swallowed or redirected somewhere else. I'm building a scala tomcat web service, and this is my foray into both manual tomcat configuration (more than a preconfigured windows package, at least :P) and scala.

Right now, I need to get the stack trace of an exception being thrown, and I'd really just like to see standard out in tomcat logs. I know that I'd want to use a proper logger at some point, but like I said, this is sort of my "hello world" web service, and I'd rather get this working before worrying about proper logging.

Help?

I'm running tomcat6 (from repos) and Ubuntu 8.10.

link|improve this question

feedback

1 Answer

up vote 3 down vote accepted

If you're using the standard packages, I believe they send it to syslog. You can check the /etc/init.d/tomcat6 file and look to see where -outfile and -errfile are set to. If it's SYSLOG then it's going to syslog, otherwise it's a filename.

The reason for this is because if it's set to a filename, it's impossible to rotate the logs as they're always kept open. You would need to restart tomcat to rotate them. They will just keep growing and growing. I believe a bug has been filed against commons-daemon to allow the files to be reopened on a signal, but I don't know if it's been fixed yet.

link|improve this answer
1  
Yes, they're in /var/log/daemon.log by default. – TRS-80 Oct 8 '09 at 7:30
I'd looked in catalina.sh before, but I didn't know what SYSLOG was referring to. Apparently that's /var/log/daemon.log – Stefan Kendall Oct 8 '09 at 13:18
feedback

Your Answer

 
or
required, but never shown

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