Keeping Your Tomcat Catalina.out Logging File Small

Following up on my Keeping Your Linux VPS Disk Usage Low post where we uncovered the out-of-control catalina.out log file, here are tips on keeping your Tomcat Catalina.out file small.

In your Tomcat /conf folder is a file. Remove the console handler as shown below. This is what writes Tomcat messages to catalina.out.

If you're using Tomcat you probably have a Java application using Log4J which is also going to write to the Catalina.out file. Find your file and up the Level to ERROR or whatever you're comfortable with.

Certain frameworks will also influence the output to Catalina.out, so if you're using something like Wicket (my fave) you'll want to make sure configuration is set to DEPLOYMENT (not DEVELOPMENT!) when in production. You'll do this in or web.xml or both.

Restart Tomcat and you should be good to go.

More Like This Post