error method
Logs an error or a structured event with an error to the console.
entry - The complete log entry containing error message, level, timestamp, context, stackTrace, and event.
Implementation
@override
Future<void> error(LogEntry entry) async {
await _logMessage(entry);
}