log-manager/src/main/java/io/airlift/log/LoggingOutputStream.java
@Override
    public synchronized void flush()
            throws IOException
    {
        super.flush();
        String record = this.toString();
        reset();

        if (record.isEmpty() || record.equals(lineSeparator)) {
            // avoid empty records
            return;
        }

        logger.info(record);
    }
@Override
    public synchronized void flush()
            throws IOException
    {
        super.flush();
        String record = this.toString();
        reset();

        if (record.isEmpty() || record.equals(lineSeparator)) {
            // avoid empty records
            return;
        }

        logger.info(record);
    }
write the current buffer contents to the underlying logger.