[ 
http://issues.apache.org/jira/browse/LOG4NET-66?page=comments#action_12368446 ] 

Ron Grabowski commented on LOG4NET-66:
--------------------------------------

I don't like the idea of using a regular expression to match filenames:

 "^" + Path.GetFileNameWithoutExtension(baseFileName) + "(\\.[0-9]*)?\\" + 
Path.GetExtension(baseFileName) + "$"

Wouldn't these filenames cause the regular expression to misbehave (square 
brackets, parenthesis, and the period have special meaning in regular 
expressions)?

 log[2.0].txt
 log[2.0].txt.1
 log[2.0].txt.2
 log(1.1).txt
 log(1.1).txt.1
 log(1.1).txt.2
 log(1.1).txt.3

I suppose writing another helper method would solve the problem:

 RegexEncode(Path.GetFileNameWithoutExtension(baseFileName))

Is there a way to use DirectoryInfo's GetFiles style searching (DOS wildcards) 
to achieve the same result?

> PreserveFileExtension with StaticFileName
> -----------------------------------------
>
>          Key: LOG4NET-66
>          URL: http://issues.apache.org/jira/browse/LOG4NET-66
>      Project: Log4net
>         Type: Improvement
>   Components: Appenders
>     Versions: 1.2.10
>  Environment: Windows Server 2003
>     Reporter: Mike Blake-Knox
>     Priority: Minor
>  Attachments: rollingFileAppender.diff
>
> I found that the patch to make all RollingFileAppender log files have the 
> same file extension (provided by Joshua Bassett) didn't work properly if the 
> log4net configuration used a static file name.
> I've attached a patch to version 312319 with his changes and mine merged.
> Mike

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

Reply via email to