logging
capability:
{
"capabilities": {
"logging": {}
}
}
Level | Description | Example Use Case |
---|---|---|
debug | Detailed debugging information | Function entry/exit points |
info | General informational messages | Operation progress updates |
notice | Normal but significant events | Configuration changes |
warning | Warning conditions | Deprecated feature usage |
error | Error conditions | Operation failures |
critical | Critical conditions | System component failures |
alert | Action must be taken immediately | Data corruption detected |
emergency | System is unusable | Complete system failure |
logging/setLevel
request:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "logging/setLevel",
"params": {
"level": "info"
}
}
notifications/message
notifications:
{
"jsonrpc": "2.0",
"method": "notifications/message",
"params": {
"level": "error",
"logger": "database",
"data": {
"error": "Connection failed",
"details": {
"host": "localhost",
"port": 5432
}
}
}
}
-32602
(Invalid params)-32603
(Internal error)Was this page helpful?