Package io.sentry.protocol
Class Message
java.lang.Object
io.sentry.protocol.Message
- All Implemented Interfaces:
JsonSerializable
,JsonUnknown
A log entry message.
A log message is similar to the `message` attribute on the event itself but can additionally hold optional parameters.
```json { "message": { "message": "My raw message with interpreted strings like %s", "params": ["this"] } } ```
```json { "message": { "message": "My raw message with interpreted strings like {foo}", "params": {"foo": "this"} } } ```
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
@Nullable String
void
serialize
(@NotNull ObjectWriter writer, @NotNull ILogger logger) void
setFormatted
(@Nullable String formatted) Sets a formatted Stringvoid
setMessage
(@Nullable String message) void
void
setUnknown
(@Nullable Map<String, Object> unknown)
-
Constructor Details
-
Message
public Message()
-
-
Method Details
-
getFormatted
-
setFormatted
Sets a formatted String- Parameters:
formatted
- a formatted String
-
getMessage
-
setMessage
-
getParams
-
setParams
-
serialize
public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException - Specified by:
serialize
in interfaceJsonSerializable
- Throws:
IOException
-
getUnknown
- Specified by:
getUnknown
in interfaceJsonUnknown
-
setUnknown
- Specified by:
setUnknown
in interfaceJsonUnknown
-