public String doLayout(ILoggingEvent event) {
    StringBuilder buf = new StringBuilder();
    startNewTableIfLimitReached(buf);

    boolean odd = true;
    if (((counter++) & 1) == 0) {
      odd = false;
    }

    String level = event.getLevel().toString().toLowerCase(Locale.US);

    buf.append(LINE_SEPARATOR);
    buf.append("<tr class=\"");
    buf.append(level);
    if (odd) {
      buf.append(" odd\">");
    } else {
      buf.append(" even\">");
    }
    buf.append(LINE_SEPARATOR);

    Converter<ILoggingEvent> c = head;
    while (c != null) {
      appendEventToBuffer(buf, c, event);
      c = c.getNext();
    }
    buf.append("</tr>");
    buf.append(LINE_SEPARATOR);

    if (event.getThrowableProxy() != null) {
      throwableRenderer.render(buf, event);
    }
    return buf.toString();
  }
@Test
  @Ignore
  public void rawLimit() throws Exception {
    StringBuilder sb = new StringBuilder();
    String header = layout.getFileHeader();
    assertTrue(header
        .startsWith("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"));
    sb.append(header);
    sb.append(layout.getPresentationHeader());
    for (int i = 0; i < CoreConstants.TABLE_ROW_LIMIT * 3; i++) {
      sb.append(layout.doLayout(new LoggingEvent(this.getClass().getName(),
          root, Level.DEBUG, "test message" + i, null, null)));
    }
    sb.append(layout.getPresentationFooter());
    sb.append(layout.getFileFooter());
    // check that the output adheres to xhtml-strict.dtd
    parseOutput(sb.toString());
  }