hello everyone, this may sound a bit dumb, but how...
# ask-community
i
hello everyone, this may sound a bit dumb, but how can i get the logs from a subflow triggered from a flow that i directly run using the python API? i have been able to get the flow logs with a subprocess that calls 'prefect flow-run logs <id>' but i cannot go further.. is it possible to retrieve them directly from my python script? is it possible to track the subflow chain execution from the initial flow ID within the python api or is it unavoidable to check the UI for flow ids etc?? thanks!
ahm, i 've just found the method used by the cli - i'll explore this path
Copy code
# Get the next page of logs
            page_logs = await client.read_logs(
                log_filter=log_filter,
                limit=num_logs_to_return_from_page,
                offset=offset,
                sort=(
                    schemas.sorting.LogSort.TIMESTAMP_DESC
                    if reverse or tail                                                                                                             
                    else schemas.sorting.LogSort.TIMESTAMP_ASC
                ),
            )