If you look at the output you got it did do exactly what you asked it to do, 
that is the result of running "yyyy-MMM-dd;quot;.txt;quot;" through the 
DateTime.ToString formatter. The 't's in the string are mapped to the 'A' or 
'P' of the AM/PM specifier. An XML entity reference for single quote is 
""" not ";quot;" but you don't even need to specify that as an entity 
reference. 

How about:

<param name="DatePattern" value="yyyy-MMM-dd'.txt'"/> 

FYI Single quotes do not need to be entity escaped within double quoted 
attribute values (and visa versa) (see 
http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-AttValue for reference).

Nicko

> -----Original Message-----
> From: Secules, Christopher T [AMSRD-AAR-AEF-A] 
> [mailto:[EMAIL PROTECTED] 
> Sent: 18 November 2005 14:13
> To: 'Log4NET Dev'
> Subject: RE: Question about RollingFileAppender output ending 
> in a txt extension ?
> 
> nope, didn't work.  I tried:
> <param name="DatePattern" value="yyyy-MMM-dd;quot;.txt;quot;"/> 
> 
> and got
> 
>  Server-2005-Nov-18;quoA;.AxA;quoA;
>  Server-2005-Nov-18;quoA;.AxA;quoA;.1
>  Server-2005-Nov-18;quoA;.AxA;quoA;.2
>  Server-2005-Nov-18;quoA;.AxA;quoA;.3
>  Server-2005-Nov-18;quoA;.AxA;quoA;.4
>  Server-2005-Nov-18;quoA;.AxA;quoA;.5
> 
> for filenames.  Any other ideas?
> 
> Chris
> 
>        
>        
>        -----Original Message----- 
>       From: Florian Ramillien [mailto:[EMAIL PROTECTED] 
>       Sent: Thursday, November 17, 2005 9:25 AM
>       To: Log4NET Dev
>       Subject: Re: Question about RollingFileAppender output 
> ending in a txt extension ?
>       
>       
>       <param name="RollingStyle" value="Date" />
>       <param name="File" value="logs\\ToolsAdminWS" />
>       <param name="DatePattern" value=".yyyy-MM-dd&quot;.txt&quot;" />
>       
>       This example work for a Date rolling files, I don't 
> know if it can be converted for Size rolling files.
>       
>       Florian.
>       
>       Secules, Christopher T [AMSRD-AAR-AEF-A] a écrit : 
> 
>               Anyone have any suggestions on this?
>                
>               Thanks!
>               Chris
>                
> 
>                       -----Original Message-----
>                       From: Secules, Christopher T 
> [AMSRD-AAR-AEF-A] [mailto:[EMAIL PROTECTED] 
>                       Sent: Tuesday, November 15, 2005 10:54 AM
>                       To: '[email protected]'
>                       Subject: Question about 
> RollingFileAppender output ending in a txt extensi on?
>                       
>                       
> 
>                       I've tried playing around with my 
> config file wrt log file names, and I can't seem to get what 
> I'm looking for.  I am wondering if there is a way to have 
> the output from the RollingFileAppender save all the log 
> files as text files (.txt).  I've noticed that if I specify 
> just a date pattern in the DatePattern parameter, the 
> resulting log files I get are named:
> 
>                       Server-2005-11-15 
>                       Server-2005-11-15.1 
>                       Server-2005-11-15.2 
>                       Server-2005-11-15.3 
>                       Server-2005-11-15.4 
>                       Server-2005-11-15.5 
>                       And so on... 
> 
>                       I'm looking for something like: 
> 
>                       Server-2005-11-15.txt 
>                       Server-2005-11-15.1.txt 
>                       Server-2005-11-15.2.txt 
>                       Server-2005-11-15.3.txt 
>                       Server-2005-11-15.4.txt 
>                       Server-2005-11-15.5.txt 
>                       And so on...so that the default program 
> to open it is something like Notepad, and not "Unknown Application" 
> 
>                       Does anyone know of any way to do this, 
> preferrably without extending the source code and just using 
> the pre-packaged log4net.dll?
> 
>                       Thanks a lot! 
>                       Chris 
> 
> 
>       -- 
>        Florian.
>       
>        Do not meddle in the affairs of browsers, for they are 
> subtle and quick to anger - Tolkien
> 
> 

Reply via email to