error method

  1. @override
void error(
  1. String message, {
  2. String? tag,
  3. Map<String, dynamic>? extra,
  4. Object? error,
  5. StackTrace? stackTrace,
})
override

Log an error message.

Implementation

@override
void error(
  String message, {
  String? tag,
  Map<String, dynamic>? extra,
  Object? error,
  StackTrace? stackTrace,
}) {
  _printLog('ERROR', VanturaLogLevel.error, _red, message, tag, extra);
  if (options.logLevel != VanturaLogLevel.none &&
      VanturaLogLevel.error.index >= options.logLevel.index) {
    if (error != null) _print('$_red[ERROR] $error$_reset');
    if (stackTrace != null) _print('$_red[STACK TRACE] $stackTrace$_reset');
  }
}