Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat with Log4j

 
sindhu sheela
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

This is my Log4j.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="appender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="c:/app.log" />
<param name="DatePattern" value="'.'yyyy-MM-dd-a"/>
<param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %C %p - %m%n"/>
</layout>
</appender>
<root>
<priority value="info"></priority>
<appender-ref ref="appender"/>
</root>
</log4j:configuration>

as I'm using DailyRollingFileAppender ,when the a new log file is create every 12hrs the server is getting stopped.
Can anyone let me know the reason.

I would also like to know how can i set the maximum number of files and clear when it exceeds this number.
Thank you in advance
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sindhu CR",
Please check your private messages regarding an important administrative matter.
-Ben
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic