exportLogsAsCsv static method
Implementation
static String exportLogsAsCsv() {
final StringBuffer buffer = StringBuffer();
buffer.writeln(
'eventType,timestamp,appState,platform,userId,screenName,screenType,isSensitive,filePath',
);
for (final event in _eventLog) {
final String line = <String>[
event.type.name,
event.timestamp.toIso8601String(),
event.appState,
event.platform,
event.userId ?? '',
event.screen?.name ?? '',
event.screen?.type ?? '',
(event.screen?.isSensitive ?? false).toString(),
event.filePath ?? '',
].map(_csvEscape).join(',');
buffer.writeln(line);
}
return buffer.toString();
}