3 Replies Latest reply on Jan 11, 2008 3:31 PM by sjmenden

    server.log size is too big

    asookazian

      In less than a couple of hours today, with one Seam2.0.0.GA app on my JBoss 4.2.1.GA, the server.log exploded to 300MB+.

      When I changed the overall threshold to WARN in log4j.xml, the size of the log was much smaller after a few minutes (approx. 5KB).

      It seems after perusing the server.log that ajax4jsf and Seam are very verbose at the DEBUG level. I'm not sure how valuable that info is to a corporate developer.

      Anybody else encountering this problem and what is the recommended solution (obviously adding filters like below but you need to know what all the culprits are @ DEBUG level to filter out from server.log).

      In prod, is the recommendation to set the threshold for server.log to ERROR?

      \jboss-4.2.1.GA\server\default\conf\jboss-log4j.xml:

      <!-- ================ -->
       <!-- Limit categories -->
       <!-- ================ -->
      
       <!-- 01/11/08 - Limit the org.jboss.seam to INFO as its DEBUG is verbose -->
       <category name="org.jboss.seam">
       <priority value="WARN"/>
       </category>


      thx.

        • 1. Re: server.log size is too big
          mmichalek

          WARN is usually good for production. DEBUG is a very fine log level and is usually appropriate for development or problem solving.

          • 2. Re: server.log size is too big
            sjmenden

            You can set in the file appender also.

            I'd go with INFO over WARN and use














            As if you are a production support customer, we almost always ask for your server.log, and it may save you some time if you can upload a log straight to us without changing the Threshold back to INFO and reproducing the problem, and a filesize of 2MB is good, it is not easy to wade through a 200MB log file.

            -Samuel

            • 3. Re: server.log size is too big
              sjmenden

              code tags would help :)

               <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
               <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
               <param name="File" value="${jboss.server.log.dir}/server.log"/>
               <param name="Append" value="false"/>
               <param name="MaxFileSize" value="2000KB"/>
               <param name="MaxBackupIndex" value="1"/>
              
               <layout class="org.apache.log4j.PatternLayout">
               <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
               </layout>
               </appender>