Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1313

RollingFileAppender / SizeBasedTriggeringPolicy : filename with character "-' is not rolled over

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    •  

       

    Description

      Environnement: Windows, Webapp in Tomcat 8, Java8  

      I have a problem with rolling over files when i use RollingFileAppender, when my filename contains the "-" chacarter.

      Example :

      <appender name="LOG-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
       <file>${LOG_ROOT_PATH}/my-file.log</file>
       <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
       <Pattern>%d{yyyyMMddHHmmss}|%msg%n</Pattern>
       </encoder>
       <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
       <fileNamePattern>${LOG_ROOT_PATH}/my-file.%i.log</fileNamePattern>
       <maxHistory>10</maxHistory>
       </rollingPolicy>
       <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
       <maxFileSize>1MB</maxFileSize>
       </triggeringPolicy>
      </appender>

      Attachments

        Activity

          People

            logback-dev Logback dev list
            aallou Abdelhafid Allou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: