Yes - you need to set the datePattern value for the appender.  Something like 
this

<appender name="RollingDebugLogFileAppender" 
type="log4net.Appender.RollingFileAppender">
   <file value="..\\Data\\Logs\\debug" />
   <appendToFile value="true" />
   <rollingStyle value="Composite" />
   <staticLogFileName value="false" />
   <datePattern value=".yyyy-MM-dd.lo\g" />
and you would set yours to
   <datePattern value=".yyyy-MM-dd.txt" />
Hope this helps.
________________________________
From: David Gerler [mailto:dger...@gmail.com]
Sent: Monday, September 20, 2010 10:23 AM
To: log4net-user@logging.apache.org
Subject: Date Rollover filename

We are using the Date rollover style for our logs. The thing we don't like is 
the fact that it appends the date to the end of the filename like 
"root.txt20100920". We'd like to have it insert the date in the middle like 
"root20100920.txt". Is that possible?

I have searched the documentation and can't seem to find anything. I also tried 
inserting [%date] in the filename in the config file, but that didn't work.

Reply via email to