Skip to main content

Overview

The DeveloperClient is the Room API for structured developer logs. Use it to send logs into the Developer Console and subscribe to live logs from other participants in the room.

Why use the Developer API?

  • Debug agents, tools, and services while a room is live.
  • Send structured log payloads instead of plain text so downstream tools can filter or render them.
  • Watch a room log stream from the CLI or SDK during development.

How it works

The Developer API is event-oriented. Producers call log (or convenience helpers such as info) to emit structured events, and consumers call logs() to subscribe to the live stream.

Permissions and grants

Developer log forwarding is controlled by the developer scope. If a deployed service needs to emit or consume developer logs, grant it the appropriate Room API permissions. See API Scopes and Packaging and Deploying Services.

CLI and SDK availability

  • CLI: watch room developer logs with meshagent room developer watch.
  • Python, JavaScript/TypeScript, Dart, and .NET: emit and consume developer logs with the helpers shown below.

Streaming Logs

  • logs() Opens a streamed subscription to developer logs for the room. Stop receiving logs by closing the stream or breaking iteration.
meshagent room developer watch \
  --room myroom

API Methods

log

  • Description: Emit a developer log event.
  • Parameters:
    • type: A log category string (for example, "info" or "error").
    • data: A JSON-serializable payload with any extra fields.
  • Returns: None
await room.developer.log(type="info", data={"message": "Hello from DeveloperClient!"})

log_nowait

  • Description: Fire-and-forget log emission without awaiting a response.
  • Availability: Python and .NET SDKs.
  • Parameters:
    • type: A log category string.
    • data: A JSON-serializable payload.
  • Returns: None
room.developer.log_nowait(type="info", data={"message": "Log without await"})

info / warning / error

  • Description: Convenience helpers for emitting structured logs with common severity labels.
  • Availability: Python and Dart SDKs.
  • Parameters:
    • message: Human-readable text.
    • extra (optional): Additional fields to include with the log.
  • Returns: None
room.developer.info("Background sync started", extra={"phase": "init"})
room.developer.warning("Retrying sync", extra={"attempt": 2})
room.developer.error("Sync failed", extra={"reason": "timeout"})

logs

  • Description: Open a streamed subscription to developer logs for the room.
  • Parameters: None.
  • Returns: A stream / async iterator of log events.
meshagent room developer watch \
  --room myroom