private static void sendLogsByRecorder(@NotNull EventLogApplicationInfo appInfo,
                                         @NotNull EventLogSendConfig config,
                                         @NotNull DataCollectorDebugLogger logger,
                                         @NotNull ExternalEventsLogger eventsLogger) {
    String recorderId = config.getRecorderId();
    logger.info("[" + recorderId + "] Start uploading...");
    EventLogConnectionSettings connectionSettings = appInfo.getConnectionSettings();
    logger.info("[" + recorderId + "] {"
                + "product:" + appInfo.getProductCode()
                + ", productVersion:" + appInfo.getProductVersion()
                + ", userAgent:" + connectionSettings.getUserAgent()
                + ", url: " + appInfo.getTemplateUrl()
                + ", internal:" + appInfo.isInternal()
                + ", isTestConfig:" + appInfo.isTestConfig()
                + ", isTestSendEndpoint:" + appInfo.isTestSendEndpoint() + "}");

    String logs = config.getFilesToSendProvider().getFilesToSend().stream().
      map(file -> file.getFile().getAbsolutePath()).collect(Collectors.joining(File.pathSeparator));
    logger.info("[" + recorderId + "] {recorder:" + config.getRecorderId() + ", files:" + logs + "}");
    logger.info("[" + recorderId + "] {device:" + config.getDeviceId() + ", bucket:" + config.getBucket() + "}");
    try {
      EventLogStatisticsService service = new EventLogStatisticsService(
        config, appInfo,
        new EventLogSendListener() {
          @Override
          public void onLogsSend(@NotNull List<String> successfullySentFiles,
                                 @NotNull List<Integer> errors,
                                 int totalLocalFiles) {
            eventsLogger.logSendingLogsSucceed(recorderId, successfullySentFiles, errors, totalLocalFiles);
          }
        });

      StatisticsResult result = service.send();
      eventsLogger.logSendingLogsFinished(recorderId, result.getCode());
      if (logger.isTraceEnabled()) {
        logger.trace("[" + recorderId + "] Uploading finished with " + result.getCode().name());
        logger.trace("[" + recorderId + "] " + result.getDescription());
      }
    }
    catch (Exception e) {
      logger.warn("[" + recorderId + "] Failed sending files: " + e.getMessage());
      eventsLogger.logSendingLogsFinished(recorderId, "ERROR_ON_SEND");
    }
  }
private static void sendLogsByRecorder(@NotNull EventLogApplicationInfo appInfo,
                                         @NotNull EventLogSendConfig config,
                                         @NotNull DataCollectorDebugLogger logger,
                                         @NotNull ExternalEventsLogger eventsLogger)