public String doLayout(ILoggingEvent event) {
    if (!isStarted()) {
      return CoreConstants.EMPTY_STRING;
    }
    return writeLoopOnConverters(event);
  }
@Test
  public void smokeReplace() {
    pl.setPattern("%replace(a1234b){'\\d{4}', 'XXXX'}");
    pl.start();
    StatusPrinter.print(lc);
    String val = pl.doLayout(getEventObject());
    assertEquals("aXXXXb", val);
  }