0 Replies Latest reply on Dec 26, 2010 9:59 PM by fenglei you

    jboss-logging.xml-DailyRollingFileAppender-log.starttime

    fenglei you Newbie

      i'm using

       

      jboss-6.0M5

      linux

      java 1.6.20

       

      edit the jboss_home/server/default/deploy/jboss-logging.xml

       

      <periodic-rotating-file-handler
               class="org.jboss.logging.appender.DailyRollingFileAppender"
               file-name="${jboss.server.log.dir}/server.log"
               name="FILE"
               autoflush="true"
               append="true"
               suffix=".yyyy-MM-dd">  <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
      
            <error-manager>
               <only-once/>
            </error-manager>
      
            <formatter>
               <!-- To revert back to simple stack traces without JAR versions, change "%E" to "%e" below. -->
               <!-- Uncomment this to get the class name in the log as well as the category -->
               <pattern-formatter pattern="%d %-5p [%c] %C{1} (%t) %s%E%n"/>
               
               <!-- Uncomment this to log without the class name in the log 
               <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
                -->
            </formatter>
         </periodic-rotating-file-handler>
      

       

       

      the start params like this:

       

      500      18382 18332 16 10:37 pts/3    00:02:39 /usr/java/jdk1.6.0_20/bin/java -server -Djava.awt.headless=true -Xms128M -Xmx512M -Duser.timezone=GMT+08 -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.library.path=/opt/jboss/jboss-6.0M5/bin/native/lib -Djava.endorsed.dirs=/opt/jboss/jboss-6.0M5/lib/endorsed -classpath /opt/jboss/jboss-6.0M5/bin/run.jar:/usr/java/jdk1.6.0_20/lib/tools.jar org.jboss.Main --host=192.168.168.42

       

      //=========================================================

       

      but the generated log file , server.log.2010-12-26 ,server.log.2010-12-25

       

      some times start(seperated)  from 12:00 ; some times start(serperated) from 00:00

      (usually ,i'm restart the server between 8:00--19:00)

       

      normaly ,  it should start/seperated from 00:00 as my expercet;

       

      //==========================================================

      2>   if i want to use  log4j to generate log for my application , how i to do this / or a config sample

       

      additional, my application used as ejb3 and packed to a jar file;  and put into the jboss_home/server/default/deploy/