Logging can be configured in plain text or structured JSON format. Each mode has advantages and limitations.

The following table compares plain text and structured JSON logging:
Mode Advantage Limitation Recommended usage
Plain text Easy to read locally Harder to parse centrally Local development and quick demos
Structured JSON Machine searchable and index-friendly Slightly larger and less readable raw Staging and production environments
The following example shows a structured log entry:
{
  "ts": "2025-10-05T12:34:56.789Z",
  "level": "info",
  "component": "request",
  "method": "tool.invoke",
  "tool": "listProducts",
  "duration_ms": 123,
  "status": 200,
  "client_id": "abc123",
  "session_id": "s-9f2",
  "payload_truncated": true
}