code: @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);
      }
docs: write the current buffer contents to the underlying logger.