I think you want a console appender or something that isn't so permanent. Overwriting the file each time you log to it really defeats the purpose of logging to file.
Jake
At 10:01 AM 6/5/2003 -0600, you wrote:
I've just discovered this group, so my apologies if this has been posted before. I looked through the archives but did not see this situation previously addressed. I've ordered a manual, but it will be awhile before it arrives.
I inherited a log4j properties file that is in xml format. One of my appenders is described as follows:
<!-- A time/date based rolling appender for TPF Martindale Report Messages --> <appender name="TPFMartindaleReport" class="org.jboss.logging.appender.DailyRollingFileAppender"> <param name="File" value="$\{cms.path\}/log/Martindale/tpfMartindale.report"/> <param name="Append" value="false"/> <param name="Threshold" value="DEBUG"/>
<!-- Rollover at midnight each day --> <param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout"> <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\\n --> <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> </layout> </appender>
We have an application that can run for days and uses this report to store accumulated status information. With this particular report, every time I log to it I would like to completely overwrite anything that might already be in the file with the most current status. If I don't do this, I will be repeating information. As you can see, I already have <param name="Append" value="false"/>, but this only takes care of cases where the application is restarted. Do you know of a way to overwrite a file EVERY TIME you log to it without restarting your application?
Thank you for your help, carol
Carol Chapman Thomson Healthcare Inc. Tel. 303-486-9199 (internal = ext. 6199) Email: [EMAIL PROTECTED]