[ 
https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774883#action_12774883
 ] 

Hakan Lindestaf commented on LOG4NET-64:
----------------------------------------

I have an issue with this issue, some of the files are still named in the old 
format.
Here's what my directory output looks like:
 Volume in drive C has no label.
 Volume Serial Number is 7057-2FE1

 Directory of C:\inetpub\wwwroot\KickService\Logs

11/09/2009  08:32 AM    <DIR>          .
11/09/2009  08:32 AM    <DIR>          ..
11/09/2009  07:56 AM            12,822 Service.log
10/28/2009  11:27 PM           748,549 Service.log20091028
10/29/2009  10:30 PM           738,261 Service.log20091029
11/05/2009  10:42 PM           819,465 Service.log20091105
11/06/2009  11:20 PM           873,142 Service.log20091106
11/07/2009  02:42 PM           148,499 Service.log20091107
11/08/2009  09:06 PM            81,809 Service.log20091108
10/16/2009  10:51 PM           586,003 Service20091016.log
10/20/2009  10:51 PM           654,559 Service20091020.log
10/21/2009  10:46 PM           848,594 Service20091021.log
10/22/2009  10:57 PM         6,586,212 Service20091022.log
10/25/2009  11:51 PM           264,567 Service20091025.log
10/26/2009  11:54 PM           908,770 Service20091026.log
10/27/2009  11:53 PM           426,759 Service20091027.log
10/30/2009  11:54 PM           456,209 Service20091030.log
10/31/2009  11:54 PM            26,600 Service20091031.log
11/01/2009  11:54 PM           153,698 Service20091101.log
11/02/2009  11:48 PM         1,194,835 Service20091102.log
11/03/2009  11:59 PM         2,587,370 Service20091103.log
11/04/2009  11:56 PM           846,138 Service20091104.log
11/09/2009  08:32 AM                 0 x.x
              21 File(s)     18,962,861 bytes
               2 Dir(s)  32,061,755,392 bytes free


See how there is a mix of the output formats. I haven't had a chance to look 
thru the code yet. I'm running log4net from svn trunk. Here's my config:
    <appender name="RollingLogFileAppender" 
type="log4net.Appender.RollingFileAppender">
      <file value="C:\Inetpub\wwwroot\Service\Logs\Service.log"/>
      <appendToFile value="true"/>
      <maxSizeRollBackups value="30"/>
      <rollingStyle value="Date"/>
      <staticLogFileName value="true"/>
      <datePattern value="yyyyMMdd"/>
      <preserveLogFileNameExtension value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%property{SessionId}] %-5level %logger 
[%property{NDC}] - %message%newline"/>
      </layout>
    </appender>


> [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file 
> name extension when rolling the log file.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-64
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-64
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Appenders
>    Affects Versions: 1.2.9
>            Reporter: Joshua Bassett
>            Assignee: Ron Grabowski
>             Fix For: 1.2.11
>
>         Attachments: LOG4NET-64.patch, LOG4NET-64.patch, patch.txt
>
>
> Normally, when the log file is rolled the file name extension is not 
> preserved.
> For example, file.log is rolled to file.log.1 or file.log.yyyy-MM-dd.
> However, this may not be desired in all cases and it may be necessary to 
> preserve the log file name extension when the log file is rolled. Most 
> notably, this feature is useful for maintaining file associations under 
> Windows so that all log files can be associated with a particaular text 
> viewer.
> For example, file.log is rolled to file.1.log or file.yyyy-MM-dd.log.
> This patch adds an additional boolean property PreserveLogFileNameExtension 
> to the RollingFileAppender class which is used to toggle this behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to