Documentation Index
Fetch the complete documentation index at: https://docs.poly.ai/llms.txt
Use this file to discover all available pages before exploring further.
This page requires Python familiarity. It covers structured logging from Python functions.
conv.log lets your function write small, structured log entries that show up in Conversation Review → Diagnosis and in the Conversations API. Use it for breadcrumbs, warnings, and errors. Without logging, function failures are invisible – you cannot debug what you cannot see.
Methods
log.info(message)
log.info(message)
Description: Add a routine breadcrumb.Example:
log.warning(message)
log.warning(message)
Description: Flag a soft failure or approaching limit.Example:
log.error(message)
log.error(message)
Description: Record a handled failure with context.Example:
PII
Setis_pii=True when the message or fields contain personally identifiable information.
Where it appears
- Conversation Review → Diagnosis: grouped under the turn’s function event.
- Conversations API: returned on function events as
logs.conversation_logger.
Entry shape
Each call produces a JSON object like this:Patterns
ValidationBest practices
- Keep messages short; put details in fields.
- Log at decision points, not in tight loops.
- Prefer identifiers over payload dumps.
- Default to
is_pii=Trueif you’re unsure.
See also
- Conversation object
- Conversation utilities
conv.log_api_response()– log full HTTP responses from API integrations to Conversation Review → Diagnosis

