code: @Override
    public void publish(final LogRecord record) {
      if (record == null) {
        return;
      }
  
      if (!isLoggable(record)) {
        return;
      }
  
      synchronized (this) {
        this.logs.add(record);
        if (!this.driverInitialized || this.logs.size() < BUFFER_LEN) {
          return;
        }
      }
  
      logAll();
    }
docs: Called whenever a log message is received on the java side.
  <p>
  Adds the log record to the log buffer. If the log buffer is full and
  the driver has already been initialized, flush the buffer of the logs.