public void addLogToBatch(TelemetryData log) throws IOException
  {
    if (isClosed)
    {
      throw new IOException("Telemetry connector is closed");
    }
    if (!isTelemetryEnabled())
    {
      return; // if disable, do nothing
    }

    synchronized (locker)
    {
      this.logBatch.add(log);
    }

    if (this.logBatch.size() >= this.forceFlushSize)
    {
      this.sendBatch();
    }
  }
public void addLogToBatch ( TelemetryData log ) throws IOException { if ( isClosed ) { throw new IOException ( "Telemetry connector is closed" ) ; } if ( ! isTelemetryEnabled ( ) ) { return ; } synchronized ( locker ) { this . logBatch . add ( log ) ; } if ( this . logBatch . size ( ) >= this . forceFlushSize ) { this . sendBatch ( ) ; } }
Add log to batch to be submitted to telemetry. Send batch if forceFlushSize
reached

@param log entry to add
@throws IOException if closed or uploading batch fails