logPluginException method Null safety

  1. @override
void logPluginException(
  1. PluginData plugin,
  2. dynamic exception,
  3. StackTrace? stackTrace
)
override

Log that the given non-priority exception was thrown, with the given stackTrace by the given plugin.

Implementation

@override
void logPluginException(
    PluginData plugin, dynamic exception, StackTrace? stackTrace) {
  List<String> fields = <String>[
    TAG_PLUGIN_EXCEPTION,
    _toString(exception),
    _toString(stackTrace)
  ];
  plugin.addToFields(fields);
  _instrumentationLogger.log(_join(fields));
}