Class McpLogMessage
java.lang.Object
dev.langchain4j.mcp.client.logging.McpLogMessage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the log payload as JSON text.Returns the log payload as a plain map, so consumers do not need a JSON library.booleanstatic 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
-
-
Method Details
-
fromMap
Parses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message, presented as plain values. -
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
-
equals
-
hashCode
-
toString
-