> ## Documentation Index
> Fetch the complete documentation index at: https://docs-old.tilebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JobClient.query_logs

```python theme={"system"}
def JobClient.query_logs(job_id: Job | UUID | str) -> LogRecords
```

Query logs emitted while running a job. Pagination is handled automatically.

## Parameters

**job\_id** `Job | UUID | str` *required*

The job, job ID, or job ID string to query logs for.

## Returns

A `LogRecords` list. Each `LogRecord` contains `time`, `severity_number`, `severity_text`, `body`, `trace_id`, `span_id`, `attributes`, and `runner_attributes`.

`LogRecords.to_pandas()` converts the records to a pandas DataFrame.

```python Python theme={"system"}
logs = client.jobs().query_logs(job)

for record in logs:
    print(record.time, record.severity_text, record.body)

df = logs.to_pandas()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.