error method

void error(
  1. dynamic msg, {
  2. StackTrace? stackTrace,
  3. String? module,
  4. LokiLabel? labels,
})

Logs an error message.

  • msg: The message to log.
  • stackTrace: The stack trace associated with the error.
  • module: The module name for the log.
  • labels: Additional labels for the log.

Implementation

void error(msg,
        {StackTrace? stackTrace, String? module, LokiLabel? labels}) =>
    _print('$msg${stackTrace == null ? '' : '\n$stackTrace'}', Level.error,
        module, {_level: Level.error.toString(), ...?labels});