1 Reply Latest reply on Nov 21, 2008 5:29 AM by Joan Bordeau

    JBOSS logs not seen after re-starting

    randhir singh Newbie

      I have a doubt that the JBOSS logs are not to be seen off before re-starting the server. Say, if I re-start the server at 10 A.M of the day, then the logs before 10 A.M are not seen but the jboss.log does get populated of the time after 10 A.M.

      I hope, my question is clear.

      Please, help in solving the doubt.

      regards

        • 1. Re: JBOSS logs not seen after re-starting
          Joan Bordeau Newbie

          Your problem comes from your log4j.xml configuration.
          If you want to keep the log before a restart of Jboss, you have to add this param :

          <param name="Append" value="true"/>


          For example :
          <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <param name="File" value="${jboss.server.log.dir}/server.log"/>
           <param name="Append" value="true"/>
          
           <!-- 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>