[logback-dev] [JIRA] Updates for LOGBACK-1698: "Nested appenders are not allowed" warning using SiftingAppender

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Oct 17 11:33:00 CEST 2022


logback / LOGBACK-1698 [Open]
"Nested appenders are not allowed" warning using SiftingAppender

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1698

==============================
 Issue created
------------------------------

albertus82 created this issue on 17/Oct/22 11:19 AM
Summary:              "Nested appenders are not allowed" warning using SiftingAppender
Issue Type:           Bug
Affects Versions:     1.4.4
Assignee:             Logback dev list
Created:              17/Oct/22 11:19 AM
Environment:
  Relevant part of the XML configuration:
  
  {code:xml}
  <appender name="MY_LOG_APPENDER" class="ch.qos.logback.classic.sift.SiftingAppender">
      <!-- Useless but mandatory for SiftingAppender -->
      <discriminator>
          <key>dummy</key>
          <defaultValue>dummy</defaultValue>
      </discriminator>
      <!-- Avoid creation of unnecessary empty files -->
      <sift>
          <appender name="MY_LOG_APPENDER_SIFT" class="ch.qos.logback.core.rolling.RollingFileAppender">
              <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
                  <fileNamePattern>${logs.directory}/mylog.%d.%i.log</fileNamePattern>
                  <maxFileSize>25MB</maxFileSize>
                  <maxHistory>30</maxHistory>
                  <totalSizeCap>250MB</totalSizeCap>
                  <cleanHistoryOnStart>true</cleanHistoryOnStart>
              </rollingPolicy>
              <encoder>
                  <pattern>%d{MMM dd HH:mm:ss} %hostaddr %msg%n</pattern>
              </encoder>
          </appender>
      </sift>
  </appender>
  {code}
Labels:               SiftingAppender
Priority:             Major
Reporter:             albertus82
Description:
  Hi,
  
  I'm migrating from 1.2 to 1.4 and I have a {{SiftingAppender}} configured like the example shown in the manual (appender > sift > appender):
  
  [https://logback.qos.ch/manual/appenders.html#SiftingAppender]
  
  Nevertheless I'm getting the warning "As of logback version 1.3, nested appenders are not allowed", which causes Logback to print its full initalization log. Am I missing something?
  
  Thank you.
  ----
  {color:#403294}_Original post: [https://github.com/qos-ch/logback/discussions/604]_{color}


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the logback-dev mailing list