pub struct LogEntry {
pub message: Annotated<Message>,
pub formatted: Annotated<Message>,
pub params: Annotated<Value>,
pub other: Object<Value>,
}
Expand description
A log entry message.
A log message is similar to the message
attribute on the event itself but
can additionally hold optional parameters.
{
"logentry": {
"message": "My raw message with interpreted strings like %s",
"params": ["this"]
}
}
{
"logentry": {
"message": "My raw message with interpreted strings like {foo}",
"params": {"foo": "this"}
}
}
Fields§
§message: Annotated<Message>
The log message with parameter placeholders.
This attribute is primarily used for grouping related events together into issues.
Therefore this really should just be a string template, i.e. Sending %d requests
instead
of Sending 9999 requests
. The latter is much better at home in formatted
.
It must not exceed 8192 characters. Longer messages will be truncated.
formatted: Annotated<Message>
The formatted message. If message
and params
are given, Sentry
will attempt to backfill formatted
if empty.
It must not exceed 8192 characters. Longer messages will be truncated.
params: Annotated<Value>
Parameters to be interpolated into the log message. This can be an array of positional parameters as well as a mapping of named arguments to their values.
other: Object<Value>
Additional arbitrary fields for forwards compatibility.