logError method
- Object error,
- StackTrace stack
Outputs error to log file
Implementation
Future<void> logError(Object error, StackTrace stack) async{
if (!_isInit) return;
final file = loggingDir / "errors.log";
await file.writeAsString("${DateTime.now().timeStamp} $error $stack\n", mode: FileMode.writeOnlyAppend);
}