private Result filter(final Throwable t) {
    if (t != null) {
      return Arrays.stream(t.getStackTrace())
              .map(StackTraceElement::getClassName)
              .anyMatch(cn -> cn.contains(text))
          ? onMatch
          : onMismatch;
    }
    return Result.NEUTRAL;
  }
Matches a text in the stack trace
util/src/main/java/org/hyperledger/besu/util/log4j/plugin/StackTraceMatchFilter.java