Retrieve function call logs
- async AsyncCogniteClient.functions.calls.get_logs(
- call_id: int,
- function_id: int | None = None,
- function_external_id: str | None = None,
Retrieve logs for function call.
- Parameters:
call_id (int) – ID of the call.
function_id (int | None) – ID of the function on which the call was made.
function_external_id (str | None) – External ID of the function on which the call was made.
- Returns:
Log for the function call.
- Return type:
Examples
Retrieve function call logs by call ID:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> logs = client.functions.calls.get_logs(call_id=2, function_id=1)
Retrieve function call logs directly on a call object:
>>> call = client.functions.calls.retrieve(call_id=2, function_id=1) >>> logs = call.get_logs()