Class McpLogMessage
java.lang.Object
dev.langchain4j.mcp.client.logging.McpLogMessage
-
Constructor Summary
ConstructorsConstructorDescriptionMcpLogMessage(McpLogLevel level, String logger, com.fasterxml.jackson.databind.JsonNode data) Deprecated, for removal: This API element is subject to removal in a future version.McpLogMessage(McpLogLevel level, String logger, Object data) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodedata()Deprecated, for removal: This API element is subject to removal in a future version.usedataAsMap()ordataAsJson().Returns the log payload as JSON text.Returns the log payload as a plain map, so consumers do not need a JSON library.booleanstatic McpLogMessagefromJson(com.fasterxml.jackson.databind.JsonNode json) Deprecated, for removal: This API element is subject to removal in a future version.usefromMap(Map), which does not expose Jackson types.static McpLogMessageParses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message, presented as plain values.inthashCode()level()logger()toString()
-
Constructor Details
-
McpLogMessage
-
McpLogMessage
@Deprecated(since="1.20.0", forRemoval=true) public McpLogMessage(McpLogLevel level, String logger, com.fasterxml.jackson.databind.JsonNode data) Deprecated, for removal: This API element is subject to removal in a future version.useMcpLogMessage(McpLogLevel, String, Object), which does not expose Jackson types.
-
-
Method Details
-
fromMap
Parses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message, presented as plain values. -
fromJson
@Deprecated(since="1.20.0", forRemoval=true) public static McpLogMessage fromJson(com.fasterxml.jackson.databind.JsonNode json) Deprecated, for removal: This API element is subject to removal in a future version.usefromMap(Map), which does not expose Jackson types.Parses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message. -
level
-
logger
-
dataAsJson
Returns the log payload as JSON text. -
dataAsMap
Returns the log payload as a plain map, so consumers do not need a JSON library.- Returns:
- null when the payload is not a JSON object. MCP allows any JSON-serializable value
here and a plain string is common, so use
dataAsObject()to read those.
-
dataAsObject
-
data
Deprecated, for removal: This API element is subject to removal in a future version.usedataAsMap()ordataAsJson(). -
equals
-
hashCode
-
toString
-
McpLogMessage(McpLogLevel, String, Object), which does not expose Jackson types.