1 Reply Latest reply on Jan 2, 2002 10:55 AM by juergenheidak

    server.log size

    mmyers

      This is probably a simple question (at least I hope so) but here goes anyway. I've more or less inherited administration for our web server (RH 7.1, JBoss (2.2.2) with Tomcat, and Apache) and we have a problem. Our /usr/local/jboss_tomcat/jboss/log/server.log file is constantly hitting the 2Gb filesize ceiling. Is there a quick way to set a max file size limit that will roll the file? We've tried CRON jobs that cat /dev/null to the file, but if it's being written to, which it almost always is, this does not work. Any help would be greatly appreciated.

      Thanks,

      Matt Myers
      mmyers@hobsons-us.com

        • 1. Re: server.log size
          juergenheidak

          JBoss uses log4j for logging.

          You can limit the filesize in two ways:

          1. Turn off logging in the log4j.properties file located in a subdirectory of the jboss/conf. Look for an entry like log4j.rootCategory=DEBUG. If you replace DEBUG with FATAL the amount of logged information should be minimized.

          2. Use the RollingFileAppender instead of the FileAppender. This gives you the possibility to define the maximum size of the logfile before its overwritten.

          Looking at the documentation of log4j (http://jakarta.apache.org/log4j/docs/index.html) would be a good idea.