logError static method

void logError(
  1. RxException error, {
  2. String? context,
})

Log an RxException with context

Implementation

static void logError(RxException error, {String? context}) {
  if (!getRxErrorConfig().logErrors) return;

  final config = getRxErrorConfig();
  if (config.customLogger != null) {
    config.customLogger!(error);
  } else {
    final prefix = context != null ? 'Rx$context Error' : 'RxError';
    debugPrint('$prefix: $error');
  }
}