}
log.warning(resultsCount + " rows exported");
}
public Iterable<RequestLogs> queryForLogs(long logRangeStartMs, long logRangeEndMs, LogsExportConfiguration exportConfig, LogsFieldExporterSet exporterSet) {
LogService ls = LogServiceFactory.getLogService();
LogQuery lq = new LogQuery();
lq = lq.startTimeMillis(logRangeStartMs)
.endTimeMillis(logRangeEndMs)
.includeAppLogs(true);
if (exportConfig.getLogLevel() != null) {
lq = lq.minLogLevel(exportConfig.getLogLevel());
}
List<Version> appVersions = exporterSet.applicationVersionsToExport();
if (appVersions != null && appVersions.size() > 0) {
lq = lq.versions(appVersions);
}
Iterable<RequestLogs> logs = ls.fetch(lq);
return logs;
}