public PatternLayoutEncoder getTagEncoder() {
    return this.tagEncoder;
  }
@Test
  public void tagExcludesStackTraces() {
    // create logging event with throwable
    LoggingEvent event = new LoggingEvent();
    Throwable throwable = new Throwable("throwable");
    ThrowableProxy tp = new ThrowableProxy(throwable);
    event.setThrowableProxy(tp);
    event.setMessage(TAG);

    setTagPattern(TAG, true);

    // if the tags match, it does not include the stack trace
    String actualTag = logcatAppender.getTagEncoder().getLayout().doLayout(event);
    assertThat(TAG, is(actualTag));
  }