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

no debug info printed when problem with FixedWindowRollingPolicy

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.0.2
    • None
    • logback-classic
    • None

    Description

      This configuration causes no debug output to be displayed:

      <configuration scan="true" scanPeriod="30 seconds" debug="true">
      
          <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
              <target>System.out</target>
              <encoder>
                  <pattern>| [%-5level] [%date{ISO8601}] [%logger] [%thread] [%X{akkaSource}] - %msg %rootException %n</pattern>
              </encoder>sdfsadf
          </appender>
      
          <appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
              <file>server.log</file>
      
              <!-- only keep 3 -->
              <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
                  <fileNamePattern>server.%i.log</fileNamePattern>
                  <minIndex>1</minIndex>
                  <maxIndex>3</maxIndex>
              </rollingPolicy>
      
              <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
                  <maxFileSize>1MB</maxFileSize>
              </triggeringPolicy>
      
              <encoder>
                  <pattern>| [%-5level] [%date{ISO8601}] [%logger] [%thread] [%X{akkaSource}] - %msg %rootException %n</pattern>
              </encoder>
          </appender>
      
          <root level="DEBUG">
              <appender-ref ref="STDOUT"/>
              <appender-ref ref="ROLLING"/>
          </root>
      
      </configuration>
      

      If I remove the rolling file appender, debug output is shown.

      If I remove just the rollingPolicy, debug output is shown.

      If I remove just the <fileNamePattern>server-event.%i.log</fileNamePattern> the debug output is displayed and the exception about the missing field is shown.

      Seems related to http://jira.qos.ch/browse/LBCORE-38 and http://jira.qos.ch/browse/LBCLASSIC-62

      Attachments

        Activity

          People

            logback-dev Logback dev list
            astubbs Antony Stubbs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: