code: public void flush() {
          if (useWarn) {
              log.warn(buffer);
          } else {
              log.info(buffer);
          }
          if (memory != null) {
              memory += buffer + "\n";
          }
          buffer = "";
      }
docs: Flushes the output stream.