---
title: "Jobs.QueryLogsPage"
description: "Query a single page of log records emitted while running a job."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

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

# Jobs.QueryLogsPage

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```go
func (jobClient) QueryLogsPage(
    ctx context.Context,
    jobID uuid.UUID,
    options ...job.TelemetryQueryOption,
) (*workflows.LogPage, error)
```

Query a single page of log records emitted while running a job.

## Parameters

**jobID**

type: uuid.UUID

required: true

The ID of the job to query logs for.
**options**

type: []job.TelemetryQueryOption

Options for querying logs.

## Options

**job.WithCursor(cursor *job.Cursor)**

Start the query after the cursor returned by a previous page.
**job.WithLimit(limit int64)**

Limit the number of log records returned in this page.
**job.WithSortDirection(direction job.SortDirection)**

Sort logs by time. Use `job.Ascending` for oldest first or `job.Descending` for newest first.

## Returns

A `LogPage` with log records and an optional `NextCursor` for the next page.

<h2 id="request-example">Usage example</h2>

```go
page, err := client.Jobs.QueryLogsPage(ctx,
    jobID,
    job.WithLimit(100),
    job.WithSortDirection(job.Ascending),
)
```

Source: https://tilebox.com/docs/api-reference/go/workflows/Jobs.QueryLogsPage/index.mdx
