Configure root logging and OpenAPI visibility settings to improve observability during debugging. These configurations provide structured logs, JSON output, and enhanced visibility into API specifications and context annotations. Use these settings when you need deeper insights into request flows and operational context without enabling global DEBUG.

Use the following configuration examples to enable root logging and OpenAPI visibility.

Root logging configuration example

This example shows a minimal root logging configuration that enables JSON output and sets log levels for key components:
{
  "logging": {
    "level": "INFO",
    "json": true,
    "loggers": {
      "openapi": "INFO",
      "startup": "INFO",
      "http.outbound": "DEBUG",
      "response_guard": "INFO",
      "tool": "INFO",
      "audit": "INFO"
    }
  }
}
Note: Structured middleware events runtime.middleware.logging.structured=true can coexist with root JSON logging.

Debug OpenAPI specification visibility

This configuration enables visibility into OpenAPI specifications and context annotations:
{
  "openapi_visibility": {
    "add_filter_examples": true,
    "add_param_examples": true,
    "per_tool_context_enabled": true,
    "context_dir": "./context",
    "global_context_char_limit": 4000
  },
  "openapi_logging": { "annotations": true, "verbose": false }
}
Note: Look for OpenAPI logger lines that confirm global or per-tool context application and tag additions.