log method

void log(
  1. LogLevel level,
  2. String message, {
  3. String? errorMessage,
  4. String? errorKind,
  5. StackTrace? errorStackTrace,
  6. Map<String, Object?> attributes = const {},
})

Sends a log message with LogLevel of level.

You can optionally send an errorMessage, errorKind, and an errorStackTrace that will be connected to this log message.

You can provide additional attributes for this log message using the attributes parameter. Values passed into attributes must be supported by StandardMessageCodec.

Implementation

void log(
  LogLevel level,
  String message, {
  String? errorMessage,
  String? errorKind,
  StackTrace? errorStackTrace,
  Map<String, Object?> attributes = const {},
}) {
  _internalLog(
      level, message, errorMessage, errorKind, errorStackTrace, attributes);
}