log method

  1. @override
void log(
  1. String message, [
  2. ErrorSeverity severity = ErrorSeverity.info
])
override

Implementation

@override
void log(String message, [ErrorSeverity severity = ErrorSeverity.info]) {
  if (folder == null) {
    return;
  }
  final output =
      '${DateTime.now().toIso8601String()} ${severity.displayName} - $message\n';
  final file = File(path.join(folder!, _fileName));
  file.writeAsStringSync(output, mode: FileMode.append);
}