trackError method
Future<void>
trackError(
- Object error, {
- StackTrace? stackTrace,
- String? message,
- bool fatal = false,
Records an error to logger.
Set fatal to true to mark the event at LogLevel.fatal.
Implementation
Future<void> trackError(
Object error, {
StackTrace? stackTrace,
String? message,
bool fatal = false,
}) {
return logger.log(
fatal ? LogLevel.fatal : LogLevel.error,
message ?? error.toString(),
error: error,
stackTrace: stackTrace,
context: trackerContext,
);
}