public String doLayout(ILoggingEvent event) {
        if (!isStarted()) {
            return CoreConstants.EMPTY_STRING;
        }
        return writeLoopOnConverters(event);
    }
@Test
    public void prefixConverterWithMDC() {
        String mdcKey = "boo";
        String mdcVal = "moo";

        String pattern = "%prefix(%level %logger %X{" + mdcKey + "}) %message";
        pl.setPattern(pattern);
        pl.start();
        logbackMDCAdapter.put(mdcKey, mdcVal);
        try {
            String val = pl.doLayout(makeLoggingEvent("hello", null));

            assertEquals("level=" + "INFO logger=" + logger.getName() + " " + mdcKey + "=" + mdcVal + " hello", val);

        } finally {
            MDC.remove(mdcKey);
        }
    }