getAllLogsByFilter static method

Future<List<Log>> getAllLogsByFilter({
  1. List<String>? dataLogsType,
  2. List<String>? logLevels,
  3. int? startTimeInMillis,
  4. int? endTimeInMillis,
  5. FilterType? filterType,
})

getAllLogsByFilter

This will return the list of logs stored based on the provided filters

Implementation

static Future<List<Log>> getAllLogsByFilter(
    {List<String>? dataLogsType,
    List<String>? logLevels,
    int? startTimeInMillis,
    int? endTimeInMillis,
    FilterType? filterType}) async {
  //check to see if user provides a valid configuration and logs are enabled
  //if not then don't do anything
  if (_isLogsConfigValid()) {
    return await _flogDao.getAllSortedByFilter(
        filters: Filters.generateFilters(
            dataLogsType: dataLogsType,
            logLevels: logLevels,
            startTimeInMillis: startTimeInMillis,
            endTimeInMillis: endTimeInMillis,
            filterType: filterType));
  } else {
    throw Exception(Constants.EXCEPTION_NOT_INIT);
  }
}