[logback-dev] [JIRA] Updates for LOGBACK-1582: CompositeConverters children are not given Context

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


logback / LOGBACK-1582 [Open]
CompositeConverters children are not given Context

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

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-1582

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

Bill Koch created this issue on 11/Oct/21 4:56 PM
Summary:              CompositeConverters children are not given Context
Issue Type:           Bug
Affects Versions:     1.2.6
Assignee:             Logback dev list
Components:           logback-core
Created:              11/Oct/21 4:56 PM
Priority:             Major
Reporter:             Bill Koch
Description:
  With a logback.xml configuration like this:
  
   
  {code:java}
  <configuration>
      <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
          <encoder>
              <pattern>[%thread] %-5level - %msg%n%replace(%rootException{5
                  , sun.reflect
                  , java.lang
                  , java.util
                  , org.gradle
                  , com.sun
                  , org.junit}){'\\n', '~~'}%nopexception</pattern>
          </encoder>
      </appender>
  
      <logger name="test" level="debug" additivity="false">
          <appender-ref ref="STDOUT"/>
      </logger>
      <root level="error">
          <appender-ref ref="STDOUT"/>
      </root>
  </configuration>
  {code}
   
  
   
  
  Logback throws a NullPointerException on startup:
  {code:java}
  10:52:50,790 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 11:19 - RuntimeException in Action for tag [encoder] java.lang.NullPointerException10:52:50,790 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 11:19 - RuntimeException in Action for tag [encoder] java.lang.NullPointerException at java.lang.NullPointerException at  at ch.qos.logback.classic.pattern.ThrowableProxyConverter.start(ThrowableProxyConverter.java:75) at  at ch.qos.logback.core.pattern.ConverterUtil.startConverters(ConverterUtil.java:37) at  at ch.qos.logback.core.pattern.ConverterUtil.startConverters(ConverterUtil.java:33) at  at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:89) at  at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28){code}


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



More information about the logback-dev mailing list