Overview
TheDeveloperClient 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 calllog (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 thedeveloper 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.
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
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
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
logs
- Description: Open a streamed subscription to developer logs for the room.
- Parameters: None.
- Returns: A stream / async iterator of log events.