0

There was a great question/answer on setting up tomcat (within eclipse) to write log files to disk (see answer by @codesta): Where can I view Tomcat log files in Eclipse?

Through the Edit Launch Configuration Properties wizard in eclipse I can specify which file to write my logs to. However, since it is a single file, it gets overwritten every time the server restarts. I already have access to the current log through the console in eclipse, but is there a way to make this a rolling file so that I can have history?

I have played around with only specifying a directory in the file path, but then no logs are written out.

Community
  • 1
  • 1
Noremac
  • 3,445
  • 5
  • 34
  • 62

1 Answers1

0

Follow the instructions to use log4j for Tomcat's internal logging:

http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Using_Log4j

The tomcat-juli jars that you need can be found here:

http://apache.osuosl.org/tomcat/tomcat-6/v6.0.35/bin/extras/

Substitute whatever version of Tomcat you're using. Your CATALINA_HOME for the purpose of libraries will be wherever you have Tomcat installed, but the CATALINA_HOME for your configuration files will likely be:

workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0

davidfmatheson
  • 3,539
  • 19
  • 27
  • I'm mostly concerned about the application logs (we are using logback for those), not the internal logging of tomcat. – Noremac Oct 05 '12 at 21:08