exportLogsString static method

Future<String> exportLogsString()

Exports all logs as a single concatenated string.

  • Returns: A future that completes with the concatenated log entries as a string.

Note: This method is not recommended for large log files as it will load the entire log file into memory.

Implementation

static Future<String> exportLogsString() async {
  final buffer = StringBuffer();

  await for (final log in exportLogsStream()) {
    buffer.write(log);
  }

  return buffer.toString();
}