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.

CLI commands

Start with the CLI help, then use the main live-log command:
bash
meshagent room developer --help
meshagent room developer watch --room myroom

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 logs are controlled by the developer grant on the participant token. In practice, developer.logs enables emitting and consuming developer-log events for the room. See API Scopes and Packaging and Deploying Services.

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 reference

Use the methods below to emit structured developer logs or subscribe to the live room log stream.

log(type, data)

  • 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(type, data)

  • 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