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

# atlanai logs

> Filter and follow the background daemon log.

Use `logs` to inspect daemon lifecycle, scheduled work, and Gateway requests.
The command reads local log files and does not contact the Gateway.

## Usage

```text theme={null}
atlanai logs [flags]
```

The command accepts no positional arguments.

## Options

| Option             | Type                  | Default | Description                                                    |
| ------------------ | --------------------- | ------- | -------------------------------------------------------------- |
| `--follow`, `-f`   | Boolean               | `false` | Print new records as they arrive.                              |
| `--tail`, `-n`     | integer               | `200`   | Initial records; `0` for none, `-1` for all.                   |
| `--since`          | duration or timestamp | none    | Include records after a duration such as `15m` or a timestamp. |
| `--until`          | duration or timestamp | none    | Include records before a duration or timestamp.                |
| `--level`          | enum                  | `info`  | Minimum level: `debug`, `info`, `warn`, or `error`.            |
| `--component`      | string                | none    | Select a subsystem, such as `api` or `daemon`.                 |
| `--grep`           | regular expression    | none    | Match message, component, or attributes.                       |
| `--json`           | string list           | none    | Select `time`, `level`, `component`, `message`, or `attrs`.    |
| `--jq`, `-q`       | string                | none    | Filter JSON output with jq.                                    |
| `--template`, `-t` | string                | none    | Render JSON data with a Go template.                           |

`--follow` cannot be combined with `--json` because the JSON document would
never end.

## Examples

```bash theme={null}
atlanai logs
atlanai logs --follow --tail 0
atlanai logs --since 1h --level warn --component api
atlanai logs --json time,level,message --jq '.[] | select(.level=="ERROR")'
```

Absolute times accept RFC 3339 and date-only forms. Durations are interpreted
backward from now.

## Output and behavior

* Human output is rendered one record per line and can include color on a TTY.
* Structured output includes normalized time, level, component, message, and
  attributes.
* A missing log or no matching records is an empty result and exits `0`.
* Known credential patterns are scrubbed, but `api-verbose` logging can contain
  request or response data. Review logs before sharing them.

## Related

* [Diagnose the CLI](/cli/diagnostics)
* [`atlanai doctor`](/cli/reference/doctor)
* [`atlanai config`](/cli/reference/config)
