error method
Logs an error or a structured event with an error to the console.
error
- The error to log.
stackTrace
- The stack trace associated with the error.
event
- An optional LogEvent providing additional context for the error.
Implementation
@override
Future<void> error({
dynamic error,
StackTrace? stackTrace,
LogEvent? event,
}) async {
await _logMessage(
LogLevel.error,
error,
event: event,
stackTrace: stackTrace,
);
}