error method

void error(
  1. String message, {
  2. Object? error,
  3. StackTrace? stackTrace,
  4. Map<String, Object?>? context,
  5. bool printStackTrace = true,
  6. bool printError = true,
})

Logs a message with LogLevel.error.

Implementation

void error(
  String message, {
  Object? error,
  StackTrace? stackTrace,
  Map<String, Object?>? context,
  bool printStackTrace = true,
  bool printError = true,
}) =>
    log(
      message,
      level: LogLevel.error,
      error: error,
      stackTrace: stackTrace,
      context: context,
      printStackTrace: printStackTrace,
      printError: printError,
    );