code: private static synchronized void collectLogEntry(int level, String tag, final String message,
              final Throwable err) {
          if (!isReportable(level)) {
              return;
          }
  
          if (maxOfEntriesInReports > 0
                  && entries.size() == maxOfEntriesInReports) {
              entries.remove(0); // Remove the first element.
          }
          entries.add(LogHelper.print(level, tag, message, err, addTimestampToReportLogs));
  
          if (level >= reportTriggerLevel) {
              // Must be in another thread
              new Thread(new Runnable() {
                  public void run() {
                      try {
                          report(message, err);
                      } catch (Throwable e) {
                          // Ignore
                      }
                  }
              }).start();
          }
      }
docs: Adds a log entry to the collected entry list. This method managed the
  maximum number of entries and triggers report if the entry priority is
  superior or equals to the report trigger level.
  
  @param level
  the log level of the entry
  @param tag
  the tag
  @param message
  the message
  @param err
  the error message