You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Joshua Bassett (JIRA)" <ji...@apache.org> on 2006/01/18 00:08:44 UTC

[jira] Created: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

[PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.
-----------------------------------------------------------------------------------------------------------------------

         Key: LOG4NET-64
         URL: http://issues.apache.org/jira/browse/LOG4NET-64
     Project: Log4net
        Type: New Feature
  Components: Appenders  
    Versions: 1.2.9    
    Reporter: Joshua Bassett


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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Created: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by Geert Verbakel <ge...@gmail.com>.
For the people who cannot wait on this patch, there is trick to force the
RollingFileAppender to do the same:
use

<param name="DatePattern" value="yyyyMMdd\.\l\o\g" />
in stead of

<param name="DatePattern" value="yyyyMMdd" />
The patch is however a cleaner solution.

Regards,
Geert


On 1/18/06, Joshua Bassett (JIRA) <ji...@apache.org> wrote:
>
> [PATCH] to RollingFileAppender.cs to add the ability to preserve the log
> file name extension when rolling the log file.
>
> -----------------------------------------------------------------------------------------------------------------------
>
>         Key: LOG4NET-64
>         URL: http://issues.apache.org/jira/browse/LOG4NET-64
>     Project: Log4net
>        Type: New Feature
> Components: Appenders
>    Versions: 1.2.9
>    Reporter: Joshua Bassett
>
>
> 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.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
>
>

[jira] Issue Comment Edited: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638872#action_12638872 ] 

ron edited comment on LOG4NET-64 at 10/12/08 10:36 AM:
-----------------------------------------------------------------

My uploaded patch also fixes the issue when the filename is absolute like "c:\\log.txt". The first two patches would write to the file correctly but would incorrectly place the rolled files in the \bin directory of the running program.

      was (Author: ron):
    My uploaded patch also fixes fixes the issue when the filename is absolute like "c:\\log.txt". The first two patches would write to the file correctly but would incorrectly place the rolled files in the \bin directory of the running program.
  
> [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
>         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.


[jira] Assigned: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Grabowski reassigned LOG4NET-64:
------------------------------------

    Assignee: Ron Grabowski

> [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
>         Attachments: 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.


[jira] Commented: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LOG4NET-64?page=comments#action_12368433 ] 

Ron Grabowski commented on LOG4NET-64:
--------------------------------------

I wasn't able to apply this patch with TSVN (TortoiseSVN 1.3.2, Build 5840). TSVN requires the header to be in this format:

Index: RollingFileAppender.cs
===================================================================
--- RollingFileAppender.cs	(revision 381326)
+++ RollingFileAppender.cs	(working copy)

After downloading the file (with FireFox, IE6, and wget) and correcting the header, I get the following error:

 "An unknown line type was found in line 5 !"

This is line 5:

 			set { m_staticLogFileName = value; }

Maybe Joshua could .zip the patch?

> [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.
> -----------------------------------------------------------------------------------------------------------------------
>
>          Key: LOG4NET-64
>          URL: http://issues.apache.org/jira/browse/LOG4NET-64
>      Project: Log4net
>         Type: New Feature
>   Components: Appenders
>     Versions: 1.2.9
>     Reporter: Joshua Bassett
>  Attachments: 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Grabowski updated LOG4NET-64:
---------------------------------

    Attachment: LOG4NET-64.patch

Based on the two earlier patches for this ticket.

This patch enables the last log file to be recognized. If a directory already has these files:

 log.1.txt
 log.2.txt

log4net will recognize that logging should resume with log.3.txt. The original RollingFileAppender had supported this but the first two patches broke that functionality.

This patch also enables the rolling date option and the composite option to correctly preserve the file extension:

 log.2008-10-12.1.txt
 log.2008-10-12.2.txt
 log.2008-10-12.3.txt
 log.2008-10-13.1.txt
 log.2008-10-13.2.txt
 log.2008-10-13.3.txt

> [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
>         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.


Re: [jira] Updated: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by Ron Grabowski <ro...@yahoo.com>.
Thanks for the patch. I'll get it merged in!



----- Original Message ----
From: Eike-Peter Falk (JIRA) <ji...@apache.org>
To: log4net-dev@logging.apache.org
Sent: Wed, December 2, 2009 7:50:21 AM
Subject: [jira] Updated: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.


     [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eike-Peter Falk updated LOG4NET-64:
-----------------------------------

    Attachment: log4net-64.patch

This patch should fix this issue.

> [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, 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.

[jira] Updated: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Eike-Peter Falk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eike-Peter Falk updated LOG4NET-64:
-----------------------------------

    Attachment: log4net-64.patch

This patch should fix this issue.

> [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, 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.


[jira] Commented: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569178#action_12569178 ] 

Ron Grabowski commented on LOG4NET-64:
--------------------------------------

TSVN won't let me apply the patch. You can help out by re-submiting the patch along with some test cases.

> [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
>         Attachments: 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.


[jira] Commented: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Hakan Lindestaf (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Grabowski resolved LOG4NET-64.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.11

Fixed. Thanks Joshua and Ayende.

> [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.


[jira] Commented: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Edouard Mercier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568865#action_12568865 ] 

Edouard Mercier commented on LOG4NET-64:
----------------------------------------

The suggested feature, which consists in preserving the file extension, is also a must for me. I am ready to provide the patch if you need to. Does anyone knows why this is currently blocked? Thank you.

Regards,
Edouard

> [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
>         Attachments: 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.


[jira] Updated: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Joshua Bassett (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-64?page=all ]

Joshua Bassett updated LOG4NET-64:
----------------------------------

    Attachment: patch.txt

Patch for RollingFileAppender.cs

> [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.
> -----------------------------------------------------------------------------------------------------------------------
>
>          Key: LOG4NET-64
>          URL: http://issues.apache.org/jira/browse/LOG4NET-64
>      Project: Log4net
>         Type: New Feature
>   Components: Appenders
>     Versions: 1.2.9
>     Reporter: Joshua Bassett
>  Attachments: 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Issue Comment Edited: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Hakan Lindestaf (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774883#action_12774883 ] 

Hakan Lindestaf edited comment on LOG4NET-64 at 11/9/09 7:35 AM:
-----------------------------------------------------------------

I have a problem 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>


      was (Author: hakanl):
    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.


[jira] Commented: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638872#action_12638872 ] 

Ron Grabowski commented on LOG4NET-64:
--------------------------------------

My uploaded patch also fixes fixes the issue when the filename is absolute like "c:\\log.txt". The first two patches would write to the file correctly but would incorrectly place the rolled files in the \bin directory of the running program.

> [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
>         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.


[jira] Updated: (LOG4NET-64) [PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file.

Posted by "Ayende Rahien (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ayende Rahien updated LOG4NET-64:
---------------------------------

    Attachment: LOG4NET-64.patch

Updated patch

> [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
>         Attachments: 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.