1 Reply Latest reply on Jan 7, 2002 2:47 AM by Adrian Brock

    generating server.log files of fixed size

    Swaminathan Newbie

      Hi,

      Is there a way to limit the size of server.log generated by jboss. So that it creates a new file without overriding the previous. This helps as the size of the files is easy to use.
      At the moment jboss creates a single file whose size becomes to large to handle.

      thanks.

        • 1. Re: generating server.log files of fixed size
          Adrian Brock Master

          In log4j.properties

          ### The server.log file appender

          log4j.appender.Default=org.apache.log4j.RollingFileAppender
          log4j.appender.Default.File=../log/server.log
          log4j.appender.Default.MaxFileSize=500KB
          log4j.appender.Default.MaxBackupIndex=1

          This keeps one active log server.log
          and the previous full one server.log.1
          Adjust the file size and number of backups to taste.

          Also, try the following if you don't want debug
          logging
          log4j.appender.Default.Threshold=INFO

          Regards,
          Adrian