File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Tomcat with Log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Tomcat with Log4j" Watch "Tomcat with Log4j" New topic
Author

Tomcat with Log4j

sindhu sheela
Greenhorn

Joined: May 20, 2008
Posts: 26
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

Joined: Dec 11, 2004
Posts: 13410

"Sindhu CR",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat with Log4j
 
Similar Threads
WARN level is not working
log4j with xml config file
Where are my log4j logs getting written to?
log4j not logging
How to supress SQL Queries in log file