Get policy decision logs

## Usage

`circleci policy logs [decision-id] [flags]`

## Arguments

`<decision-id>` is optional and retrieves a single log entry.
When omitted, all logs are returned (paginated automatically).

## Flags

| Flag                      | Description                                                                       |
| ------------------------- | --------------------------------------------------------------------------------- |
| `--after string`          | Return logs created after this time (RFC3339 or YYYY-MM-DD)                       |
| `--before string`         | Return logs created before this time (RFC3339 or YYYY-MM-DD)                      |
| `--branch string`         | Filter by branch name                                                             |
| `--jq string`             | Process values from the response using jq syntax (see `circleci help formatting`) |
| `--json`                  | Output as JSON                                                                    |
| `--org string`            | Organization slug (e.g. gh/myorg) or UUID (required)                              |
| `--out string`            | Write output to this file instead of stdout                                       |
| `--policy-bundle`         | Retrieve the policy bundle snapshot for the given decision ID                     |
| `--policy-context string` | Policy context (default "config")                                                 |
| `--project-id string`     | Filter by project ID                                                              |
| `--status string`         | Filter by decision status (PASS, SOFT_FAIL, HARD_FAIL, ERROR)                     |

Global flags: `-c, --config`, `--debug`, `--no-color`, `-q, --quiet` — see `circleci --help`.

## Examples

- Get all decision logs: 
  `circleci policy logs --org gh/acme`
- Get a specific decision log: 
  `circleci policy logs abc123 --org gh/acme`
- Filter by status and branch: 
  `circleci policy logs --org gh/acme --status HARD_FAIL --branch main`
- Write output to a file: 
  `circleci policy logs --org gh/acme --out logs.json`

## Details

Retrieve policy decision logs for an owner.

Without a decision ID, returns all logs (paginated automatically).
Pass a decision ID to retrieve a single log entry. Use --policy-bundle
to retrieve only the policy bundle snapshot for a given decision.

Logs can be filtered by status, branch, project, and time range.
Use --out to write results to a file.

JSON fields: id, status, created_at, org_id, project_id, branch, build_number, policies, decision, metadata

