Elements runtime reference / Diagnostics

logger

Write structured Element execution diagnostics captured in execution log details.

Signatuur

logger.info(message, *args, **kwargs) / logger.exception(message, *args, **kwargs)

Doel

Write structured Element execution diagnostics captured in execution log details.

Aliases and imports

  • logger.info
  • logger.warning
  • logger.error
  • logger.exception

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "level": "info|warning|error|exception",
  "message": "sync failed",
  "extra": {
    "batchId": "batch-123"
  }
}
FieldDescription
messageLog message string. Prefer bounded operational context.
args/kwargsStandard Python logging arguments.

Return payload

{
  "severity": "ERROR",
  "logger": "dashview.element",
  "message": "sync failed",
  "timestamp": "2026-07-06T12:00:00Z",
  "stackTrace": "... for logger.exception"
}

Voorbeeld

def run():
    try:
        sync_rows()
    except Exception:
        logger.exception("sync failed")
        raise

Scope-notities