SYSTEM$GET_SERVICE_LOGS

functionsupportedContainer services & dev tooling

docs.snowflake.com ↗

System functions

Retrieves local logs from a Snowpark Container Services service container. Snowpark Container Services is available to accounts in AWS, Microsoft Azure, and Google Cloud Platform commercial regions, with some exceptions. For more information, see Available regions and considerations.

Syntax

supportedpartialnot supportednot scored

SYSTEM$GET_SERVICE_LOGS( <service_name>, <instance_id>, <container_name>
   [, <number_of_most_recent_lines> ] [, <retrieve_previous_logs> ])

Parameters

NameRequiredDescription
service_namerequiredService name.
instance_idrequiredID of the service instance, starting with 0.
container_namerequiredContainer name as specified in the service specification file.
number_of_most_recent_linesoptionalNumber of trailing log lines to retrieve. Default: Up to 100 KB of the most recent log lines.
retrieve_previous_logsoptionalIf TRUE, the function retrieves logs from a previously terminated container. You can specify this parameter only if the container has been restarted at least once. Default: false (retrieve logs from the currently running container).

Returns

Returns a string consisting of newline-separated log entries from the specified service container.

Usage notes

See also

Referenced by