4 Replies Latest reply on May 5, 2009 4:50 PM by jtcnz

    Why does NOT JBoss save the server.log file any more?

      I am using JBoss 4.0.3SP1 to combine a three-nodes cluster, the configuration file log4j.xml is default.

      The strange thing is, the server.log files were saved in jboss\server\all\log directory until 02-25-09 and were not saved any more in every node. But there is also a server.log file which is logging the current information. This file is supposed to be saved if I look into the log directory tomorrow. BUT it would be NOT!

      WHY?? Is there some size limitation of log directory?

      Thank you

        • 1. Re: Why does NOT JBoss save the server.log file any more?
          peterj

          The default config for the server.log uses a daily rolling file appender. Each day, at midnight, the existing file is renamed and a new server.log opened. Did anyone change that configuration? Could you post the FILE appender declaration?

          There is no size limitation on the log directory. How many log files are in the log directory at this time? How much free space is available in that partition? Also, are the timestamps for the log messages in server.log correct? If the system clock is incorrect then midnight is not midnight any more.

          When posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.

          • 2. Re: Why does NOT JBoss save the server.log file any more?

            Thank you , Peter.

            There are already 2 GB log files(server.log+wrapper.log), and 120G available in this partition. The timestamps for the log messages are correct.

            Here is the code of FILE appender:

            <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
             <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
             <param name="Target" value="System.out"/>
             <param name="Threshold" value="INFO"/>
            
             <layout class="org.apache.log4j.PatternLayout">
             <!-- The default pattern: Date Priority [Category] Message\n -->
             <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
             </layout>
             </appender>



            Is it right? Is there some interference from wrapper side?
            Thanks

            • 3. Re: Why does NOT JBoss save the server.log file any more?
              peterj

              You posted the CONSOLE appender config...

              • 4. Re: Why does NOT JBoss save the server.log file any more?

                sorry..-_-!

                <!-- A time/date based rolling appender -->
                 <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
                 <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
                 <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
                 <param name="Append" value="false"/>
                
                 <!-- Rollover at midnight each day -->
                 <param name="DatePattern" value="'.'yyyy-MM-dd"/>
                
                 <!-- Rollover at the top of each hour
                 <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
                 -->
                
                 <layout class="org.apache.log4j.PatternLayout">
                 <!-- The default pattern: Date Priority [Category] Message\n -->
                 <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
                
                 <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
                 <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
                 -->
                 </layout>
                 </appender>


                This is the FILE appender.
                Thanks