This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create daily server logs in jBoss
 
Similar Threads
DailyRollingFileAppender rolling after 489KB
server.log showing INFO even after jboss-log4j.xml configured to ERROR mode. Please help
persist previous server.log after server restarts using log4j.xml
JBoss' embedded tomcat not Logging
log4j.xml for app log.