Canonical: https://weaveos.com/reference/gitlab/read-ci-job-logs

1. [Software capabilities](https://weaveos.com/reference)
2. /[GitLab](https://weaveos.com/reference/gitlab)
3. /Read GitLab CI job logs

GitLab capability

# Read GitLab CI job logs

Fetch a job’s trace through the Jobs API when another program needs the log. Use glab to follow a running job or open its log in GitLab.

Documentation reviewed November 26, 2026

## Ways to do it

API

### GET /projects/{id}/jobs/{job\_id}/trace

Return the log file for a specific job in the project.

- Requirements

  Project ID or URL-encoded path, numeric job ID, and API access to the project.

- Limitations

  GitLab returns HTTP 404 if the job or its trace is unavailable.

Example

```
curl --fail -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \
  "$GITLAB_URL/api/v4/projects/$PROJECT_ID/jobs/$JOB_ID/trace"
```

[Read source: GitLab Jobs API job trace ↗](https://docs.gitlab.com/api/jobs/#retrieve-a-log-file-for-a-job)

CLI

### glab ci trace \<job-id>

Follow a GitLab CI job’s trace in the terminal.

- Requirements

  glab authenticated to the GitLab host with access to the project and a job ID or name.

- Limitations

  When using a job name without a job ID, the branch and pipeline selection affect which trace you see.

Example

```
glab ci trace "$JOB_ID" --repo "$PROJECT_PATH"
```

[Read source: GitLab CLI ci trace ↗](https://docs.gitlab.com/cli/ci/trace/)

Interface

### Build → Jobs → job log

Select the job to watch its output or inspect a finished run.

- Requirements

  Project access and a job whose log is still available.

- Limitations

  GitLab limits job log size. Output beyond the configured limit may be missing.

[Read source: GitLab CI job logs ↗](https://docs.gitlab.com/ci/jobs/job_logs/)

## More from GitLab

[View all GitLab capabilities →](https://weaveos.com/reference/gitlab)

- [List pipelines in a GitLab project↗](https://weaveos.com/reference/gitlab/list-project-pipelines)
- [Read a GitLab merge request diff↗](https://weaveos.com/reference/gitlab/read-merge-request-diff)
- [Download GitLab CI job artifacts↗](https://weaveos.com/reference/gitlab/download-ci-job-artifacts)
