View Javadoc
1   package ch.qos.logback.classic.pattern;
2   
3   import ch.qos.logback.classic.spi.ILoggingEvent;
4   
5   import static org.junit.jupiter.api.Assertions.assertNull;
6   
7   public class XThrowableHandlingConverter extends ThrowableHandlingConverter {
8   
9       void assertNoNext() {
10          assertNull(this.getNext(), "has next");
11      }
12  
13      @Override
14      public String convert(ILoggingEvent event) {
15          if (event.getMessage().contains("assert"))
16              assertNoNext();
17          return "";
18      }
19  
20  }