SentryMessage class

The Message Interface carries a log message that describes an event or error. Optionally, it can carry a format string and structured parameters. This can help to group similar messages into the same issue. example of a serialized message:

{
  "message": {
    "message": "My raw message with interpreted strings like %s",
    "params": ["this"]
  }
}
Annotations
  • @immutable

Constructors

SentryMessage(String formatted, {String? template, List? params, Map<String, dynamic>? unknown})
const
SentryMessage.fromJson(Map<String, dynamic> data)
Deserializes a SentryMessage from JSON Map.
factory

Properties

formatted String
The fully formatted message. If missing, Sentry will try to interpolate the message.
final
hashCode int
The hash code for this object.
no setterinherited
params List?
A list of formatting parameters, preferably strings. Non-strings will be coerced to strings.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
template String?
The raw message string (uninterpolated). example : "My raw message with interpreted strings like %s",
final
unknown Map<String, dynamic>?
final

Methods

copyWith({String? formatted, String? template, List? params}) SentryMessage
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Produces a Map that can be serialized to JSON.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited