client.scripts.post_containers_runs_logs
A method of the Scripts endpoint.
- post_containers_runs_logs(id: int, run_id: int, *, message: str = None, level: str = None, messages: List[dict] = None, child_job_id: int = None) Response
Add log messages
API URL:
POST /scripts/containers/{id}/runs/{run_id}/logsimport civis client = civis.APIClient() response = client.scripts.post_containers_runs_logs(...)
- Parameters:
- idint
The ID of the script.
- run_idint
The ID of the script run.
- messagestr, optional
The log message to store.
- levelstr, optional
The log level of this message [default: info]
- messagesList[dict], optional
If specified, a batch of logs to store. If createdAt timestamps for the logs are supplied, the ordering of this list is not preserved, and the timestamps are used to sort the logs.If createdAt timestamps are not supplied, the ordering of this list is preserved and the logs are given the timestamp of when they were received.
- messagestr
The log message to store.
- levelstr
The log level of this message [default: info]
- created_atstr (date-time)
The timestamp of this message in ISO 8601 format. This is what logs are ordered by, so it is recommended to use timestamps with nanosecond precision. If absent, defaults to the time that the log was received by the API.
- child_job_idint, optional
The ID of the child job the message came from.
- Returns:
- None
Response code 204: success