void write(StringBuilder buf, Throwable t) {
        PrintStream targetStream = CONFIG_PARAMS.outputChoice.getTargetPrintStream();

        synchronized (CONFIG_PARAMS) {
            targetStream.println(buf.toString());
            writeThrowable(t, targetStream);
            targetStream.flush();
        } 

    }
To avoid intermingling of log messages and associated stack traces, the two
operations are done in a synchronized block.

@param buf
@param t
slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java