[jira] Created: (LOG4NET-234) RollingFileAppender generates incorrect file name

View: New views
1 Messages — Rating Filter:   Alert me  

[jira] Created: (LOG4NET-234) RollingFileAppender generates incorrect file name

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


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.