aspose file tools*
The moose likes Other Open Source Projects and the fly likes how to create daily server logs in jBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "how to create daily server logs in jBoss" Watch "how to create daily server logs in jBoss" New topic
Author

how to create daily server logs in jBoss

anwar pasha
Greenhorn

Joined: Jun 10, 2008
Posts: 19
I am using jboss4.5 .
In my jboss server log4j.xml file below code is setted


<appender name="FILE" class="org.jboss.logging.appender.FileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.home.dir}/log/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{ISO8601} %-5p [%c] %m%n"/>
</layout>
</appender>

unable to create daily logs.
it should be display like
ex:
server.log.01.01.20009
server.log.01.02.20009
anwar pasha
Greenhorn

Joined: Jun 10, 2008
Posts: 19
Using this working fine..........

<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.home.dir}/log/server.log"/>
<param name="Append" value="true"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{${DatePattern}} %p %c - %m%n %x"/>
</layout>
</appender>
 
 
subject: how to create daily server logs in jBoss