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

Multiple dependencies in loggers are not properly taken into account

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.3.0-alpha14
    • 1.3.0-alpha13
    • None
    • None

    Description

      This issue affects logback version 1.3.0-alpha13.

      When a logger declares multiple appenders one of which is an AsyncAppender, the AsyncAppender is not taken into account properly.

      To reproduce:

      <!-- Note: this canonical form requires logback 1.3 -->
      <configuration debug="true">
        <import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
        <import class="ch.qos.logback.classic.AsyncAppender"/>
        <import class="ch.qos.logback.core.FileAppender"/>
        <import class="ch.qos.logback.core.ConsoleAppender"/>
      
        <appender name="CON" class="ConsoleAppender">
          <encoder class="PatternLayoutEncoder">
            <pattern>%-5level %logger{36} - %msg%n</pattern>
          </encoder>
        </appender>
      
        <appender name="ASYNC" class="AsyncAppender">
          <appender-ref ref="FILE"/>
        </appender>
      
        <appender name="FILE" class="FileAppender">
          <file>app.log</file>
          <append>false</append>
          <encoder class="PatternLayoutEncoder">
            <pattern>%level %logger - %msg%n</pattern>
          </encoder>
        </appender>
      
        <root level="trace">
          <appender-ref ref="CON"/>
          <appender-ref ref="ASYNC"/>
        </root>
      </configuration>
      

      ceki Ceki Gülcü made changes - 1 hour ago

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            ceki Ceki Gülcü
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: