call method

  1. @override
void call(
  1. Hub hub,
  2. SentryOptions options
)

A Callable method for the Integration interface

Implementation

@override
void call(Hub hub, SentryOptions options) {
  _hub = hub;
  _subscription = Logger.root.onRecord.listen(
    _onLog,
    onError: (Object error, StackTrace stackTrace) async {
      await _hub.captureException(error, stackTrace: stackTrace);
    },
  );
  options.sdk.addPackage(packageName, sdkVersion);
  options.sdk.addIntegration('LoggingIntegration');
}