Rob

There is a property PreserveLogFileNameExtension checked into the trunk, but I 
don't think it is in the shipped version of log4net and there is an issue 
reported against it, https://issues.apache.org/jira/browse/LOG4NET-203, 
RollingFileAppender does not roll more than one time when 
PreserveLogFileNameExtension is true. The original issue that added this 
feature is at https://issues.apache.org/jira/browse/LOG4NET-64.

To use it, you would add the following line to your appender

<preserveLogFileNameExtension value="true"/>

I have a compiled version of the current source at 
http://www.alteridem.net/2010/07/09/log4net-udpappender-with-ipv6-on-windows-vista-and-7/
 that you can try if this feature is important to you, but I would suggest 
testing it before you deploy as it is not an official release and likely 
contains bugs.

Rob

-----Original Message-----
From: Rob Richardson [mailto:[email protected]] 
Sent: Wednesday, July 28, 2010 3:57 PM
To: Log4NET User
Subject: Rotated file name control

Greetings!

I am using a rotating file log.  The current file is TrendMasterCS.log.
Yesterday's file is TrendMasterCS.log.2010-07-10.  Since the default
action for a file is based on its extension, I would prefer the rotated
file name to be TrendMasterCS.2010-07-10.log.  I didn't see a way to
control that.  Can it be controlled?

Thank you.

RobR

Reply via email to