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

Alex Vilela commented on LOG4NET-234:
-------------------------------------

I experience the same behavior. I have an IIS web application and the log files 
become multiplied:

datalog.2009.11.04.log
datalog.2009.11.04.log.2009.11.04.log
datalog.2009.11.04.log.2009.11.04.log.2009.11.04.log

Unlikely LOG4NET-175 everything keeps working fine and never crashes. 
The file isn't really rolled out, I mean, one file is not a sequence of the 
previous one. 
Some logs happen on the first file, some on the second, then on the third, than 
log4net uses the first again and keep switching between the log files, 
therefore reading the logs is really hard.
Please see attached log files.

This is my configuration for the appender:
    <appender name="dataLog" 
type="log4net.Appender.RollingFileAppender,log4net">
        <param name="File" value="logs/datalog"/>
        <param name="AppendToFile" value="true"/>
        <param name="RollingStyle" value="Date"/>
        <param name="DatePattern" value=".yyyy.MM.dd.'log'"/>
        <param name="StaticLogFileName" value="false"/>

        <layout type="log4net.Layout.PatternLayout,log4net">
            <param name="ConversionPattern" value="%d [%t] %-5p %c.%M - %m%n"/>
        </layout>
    </appender>

I'm using log4net 1.2.10.0

> RollingFileAppender generates incorrect file name
> -------------------------------------------------
>
>                 Key: LOG4NET-234
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-234
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows XP, Windows 2003
>            Reporter: Miroslav Vanicky
>         Attachments: logs.zip
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I have Appender defined as follow...
> <appender name="RollingFileAppender" 
> type="log4net.Appender.RollingFileAppender" >
>     <file value="Logs\Log" /> <!-- Základní název souboru -->
>     <appendtofile value="true" />
>     <rollingstyle value="Date" /> <!-- Soubory budou vznikat na základě 
> datumu/času logu -->
>     <datepattern value="_yyyy-MM-dd.\tx\t"/> <!-- Maska pro název souboru (to 
> .\tx\t tam musí být, aby byla přípona .txt)-->
>     <StaticLogFileName value="false" /> <!-- Už první vzniklý soubor bude mít 
> název obsahující datum. Jinak by logoval stále do jednoho stejného souboru a 
> ten by v případě potřeby (změna datumu) přejmenoval -->
>     <!-- Co a jak bude formátováno ve výstupu.
>     Seznam všech dostupných %proměnných je na: 
> http://logging.apache.org/log4net/release/sdk/log4net.Layout.PatternLayout.html
>  
>     Na stejné stránce dole je popsáno i co znamená to -5level apod. -->
>     <layout type="log4net.Layout.PatternLayout">
>       <conversionpattern value="%date [%-5level] - 
> %message%newline"></conversionpattern>
>     </layout>
>   </appender>
> This Appender should generate file names like "Log_2009-10-15.txt", mostly it 
> works fine, but in some unknown situations it generates file named 
> "Log_2009-10-15.txt_2009-10-15.txt". It seems to me that this happens when 
> there were no log-files and the incorrectly named file was the first log-file 
> generated.

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