Build logs
Pass an onBuildLogs callback in JavaScript, on_build_logs in Python, or TemplateBuildOptions.OnLog in Go to receive messages during a build.
The SDK emits structured entries with a timestamp, level, and message. Levels are debug, info, warn, and error. Use toString() in JavaScript, str() in Python, or format the BuildLogEntry fields in Go.
For terminal output, use defaultBuildLogger({ minLevel: "info" }) or default_build_logger(min_level="info"). Supply your own callback when logs must be filtered or sent to another destination.
A background build has no waiting callback. Fetch new entries with getBuildStatus, get_build_status, or BuildStatus and advance the offset. The Build a template guide shows the polling loop.
Do not write credentials or secret variable values to build logs.