Skip to main content
Use logging to surface status updates, errors, and debug info. Standard logs appear in the Circuit UI for end users; debug logs stay in the console during local development.

Log

Parameters:
  • message: String, object, array, or Pydantic model to log
  • error (optional): If true, log as error level
  • debug (optional): If true, only log to console (skip backend)
Response:
  • success (boolean): Whether the log was sent
  • error (string | null): Error message if sending failed
Example:

Notes

  • To ensure a good user experience, make sure that any logs which do not have debug=True are clean and concise.
  • Objects and arrays are pretty-printed in the console and serialized to JSON strings when sent to the backend.
  • Pydantic models (Python) are automatically converted via .model_dump() before serialization.

See Also