Hi, You need to use a DailyRollingFileAppender. You'll get the rollover and file naming (no overwriting). See the javadoc for org.apache.log4j.DailyRollingFileAppender and examples in the mailing list archives for this list.
Unless I completely misunderstood your question? Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Chris Yoerg [mailto:[EMAIL PROTECTED]] >Sent: Thursday, December 12, 2002 11:15 AM >To: Log4J Users List >Subject: Need help with JBoss log files > >I'm creating a custom log file within JBoss using a log4j.xml config >file. I've successfully made the custom logger track actions of users >within the application in question, utilizing the following >configuration information(I'm getting the proper info). > >I want the appender to create a new file every day, rather than >overwrite the same file, creating a history record of all changes made >to the database, which must be kept forever (it's for a law firm you >know). > >The behavior I want is similar to the localhost_access(date).log files >that tomcat creates. I would appreciate it if somebody could tell me >what modifications I need to make to the log4j.xml file to do this >properly. > >I have looked in the archives, and the JBoss documentation doesn't tell >me what to do. > >Thank you. > >Chris Yoerg > >These are the modifications to log4j.xml file that I have made so far. > ><!-- Custom logging for patent prior art database changes--> > <appender name="PRIORART" >class="org.jboss.logging.appender.RollingFileAppender"> > <param name="File" >value="${jboss.server.home.dir}/log/priorart.log"/> > <param name="Append" value="false"/> > <param name="Threshold" value="INFO"/> > <param name="MaxFileSize" value="500KB"/> > <param name="MaxBackupIndex" value="10"/> > > <layout class="org.apache.log4j.PatternLayout"> > <param name="ConversionPattern" value="%d{MMM dd,yyyy HH:mm:ss} >%-5p [%c{1}] %m%n"/> > </layout> > </appender> > > ><!-- Custom categories for patent prior art database changes--> > <category name="net.yoerg"> > <priority value="INFO" /> > <appender-ref ref="PRIORART"/> > </category> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>