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 rockom <ro...@gmail.com> on 2008/03/09 15:34:38 UTC

RollingFileAppender BUG...

Hi
my log file is configured to be : log09032008.
my problem is that sometimes, the file is append to itself another date.
example : instead of "log09032008" i get this "log0903200809032008".
my config file look like this :

<appender name="GeneralLog" type="log4net.Appender.RollingFileAppender">	
	<file value="c:\log" />	
	<rollingStyle value="Date" />
	<appendToFile value="true" />
	<datePattern value="yyyyMMdd"/>
      <staticLogFileName value="false" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger
[%property{NDC}] -    message%newline"/>
      </layout>
    </appender>


thanks
-- 
View this message in context: http://www.nabble.com/RollingFileAppender-BUG...-tp15931291p15931291.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


Re: RollingFileAppender BUG...

Posted by Raghunandan S <Ra...@Lntemsys.com>.
If you have the concern that the file name should be appended with date, 
then you can do it programatically as well. 

- Raghunandan




rockom <ro...@gmail.com> 
03/11/2008 01:08 PM
Please respond to
"Log4NET Dev" <lo...@logging.apache.org>


To
log4net-dev@logging.apache.org
cc

Subject
Re: RollingFileAppender BUG...







hi 
first i am using asp.net.
second' i tried to set the staticLogFileName property to true but then the
file does not append the date



Ron Grabowski wrote:
> 
> A couple other people have experienced this in the past too, usually
> because they're using the MinimalLock. Is another process trying to
> interact with the log file while you're writing to it? Are you using
> ASP.Net?
> 
> ----- Original Message ----
> From: rockom <ro...@gmail.com>
> To: log4net-dev@logging.apache.org
> Sent: Sunday, March 9, 2008 10:34:38 AM
> Subject: RollingFileAppender BUG...
> 
> 
> Hi
> my log file is configured to be : log09032008.
> my problem is that sometimes, the file is append to itself another date.
> example : instead of "log09032008" i get this "log0903200809032008".
> my config file look like this :
> 
> <appender name="GeneralLog" type="log4net.Appender.RollingFileAppender"> 
 
>     <file value="c:\log" /> 
>     <rollingStyle value="Date" />
>     <appendToFile value="true" />
>     <datePattern value="yyyyMMdd"/>
>       <staticLogFileName value="false" />
>       <layout type="log4net.Layout.PatternLayout">
>         <conversionPattern value="%date [%thread] %-5level %logger
> [%property{NDC}] -    message%newline"/>
>       </layout>
>     </appender>
> 
> 
> thanks
> -- 
> View this message in context:
> 
http://www.nabble.com/RollingFileAppender-BUG...-tp15931291p15931291.html
> Sent from the Log4net - Dev mailing list archive at Nabble.com.
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RollingFileAppender-BUG...-tp15931291p15975667.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.



Re: RollingFileAppender BUG...

Posted by rockom <ro...@gmail.com>.
hi 
first i am using asp.net.
second' i tried to set the staticLogFileName property to true but then the
file does not append the date



Ron Grabowski wrote:
> 
> A couple other people have experienced this in the past too, usually
> because they're using the MinimalLock. Is another process trying to
> interact with the log file while you're writing to it? Are you using
> ASP.Net?
> 
> ----- Original Message ----
> From: rockom <ro...@gmail.com>
> To: log4net-dev@logging.apache.org
> Sent: Sunday, March 9, 2008 10:34:38 AM
> Subject: RollingFileAppender BUG...
> 
> 
> Hi
> my log file is configured to be : log09032008.
> my problem is that sometimes, the file is append to itself another date.
> example : instead of "log09032008" i get this "log0903200809032008".
> my config file look like this :
> 
> <appender name="GeneralLog" type="log4net.Appender.RollingFileAppender">    
>     <file value="c:\log" />    
>     <rollingStyle value="Date" />
>     <appendToFile value="true" />
>     <datePattern value="yyyyMMdd"/>
>       <staticLogFileName value="false" />
>       <layout type="log4net.Layout.PatternLayout">
>         <conversionPattern value="%date [%thread] %-5level %logger
> [%property{NDC}] -    message%newline"/>
>       </layout>
>     </appender>
> 
> 
> thanks
> -- 
> View this message in context:
> http://www.nabble.com/RollingFileAppender-BUG...-tp15931291p15931291.html
> Sent from the Log4net - Dev mailing list archive at Nabble.com.
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/RollingFileAppender-BUG...-tp15931291p15975667.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


Re: RollingFileAppender BUG...

Posted by Raghunandan S <Ra...@Lntemsys.com>.
Hi,
   This is issue is to the property staticLogFileName. If you set this as 
true, then the log file name would be log09032008 only. staticLogFileName 
tries to create multiple files (rollingFile); staticLogFileName = true 
would append to a single file.

Regards,
Raghunandan S

rockom <ro...@gmail.com> wrote on 03/09/2008 08:04:38 PM:

> 
> Hi
> my log file is configured to be : log09032008.
> my problem is that sometimes, the file is append to itself another date.
> example : instead of "log09032008" i get this "log0903200809032008".
> my config file look like this :
> 
> <appender name="GeneralLog" type="log4net.Appender.RollingFileAppender"> 
 
>    <file value="c:\log" /> 
>    <rollingStyle value="Date" />
>    <appendToFile value="true" />
>    <datePattern value="yyyyMMdd"/>
>       <staticLogFileName value="false" />
>       <layout type="log4net.Layout.PatternLayout">
>         <conversionPattern value="%date [%thread] %-5level %logger
> [%property{NDC}] -    message%newline"/>
>       </layout>
>     </appender>
> 
> 
> thanks
> -- 
> View this message in context: http://www.nabble.
> com/RollingFileAppender-BUG...-tp15931291p15931291.html
> Sent from the Log4net - Dev mailing list archive at Nabble.com.
>