# noust log

Search the logs of every application, and set how long the journal keeps them.

```bash
noust log [OPTIONS] COMMAND [ARGS]...
```

Subcommands: [`retention`](#noust-log-retention), [`search`](#noust-log-search)

## noust log retention

How long the journal keeps the logs.

```bash
noust log retention [OPTIONS] COMMAND [ARGS]...
```

Subcommands: [`clear`](#noust-log-retention-clear), [`set`](#noust-log-retention-set), [`show`](#noust-log-retention-show)

## noust log retention clear

Remove Noust's retention: journald goes back to its own defaults.

```bash
noust log retention clear [OPTIONS]
```

| Option | What it does | Default |
|---|---|---|
| `--reason` | Why this change is made (a change reference, a ticket). Recorded with the command in the audit log; required only where a compliance framework asks for it (ENS) or security.change_reasons is on. |  |

## noust log retention set

Keep the logs this long and/or within this much disk; journald is restarted (it keeps what it has).

```bash
noust log retention set [OPTIONS]
```

| Option | What it does | Default |
|---|---|---|
| `--days` | Drop entries older than this many days. |  |
| `--max-use` | Use at most this many megabytes of disk. |  |
| `--persistent`, `--volatile` | Keep the journal across reboots (or only in memory). |  |
| `--reason` | Why this change is made (a change reference, a ticket). Recorded with the command in the audit log; required only where a compliance framework asks for it (ENS) or security.change_reasons is on. |  |

## noust log retention show

Show how long the logs are kept and how much disk they take.

```bash
noust log retention show [OPTIONS]
```

| Option | What it does | Default |
|---|---|---|
| `-v`, `--verbose` | Show the detail of each step. |  |
| `--dry-run` | Rehearse without changing anything. Read-only checks still run. |  |
| `--no-color` | Never emit colour. |  |
| `--json` | Print the retention as JSON. |  |
| `--reason` | Why this change is made (a change reference, a ticket). Recorded with the command in the audit log; required only where a compliance framework asks for it (ENS) or security.change_reasons is on. |  |

## noust log search

Search the logs of the applications, newest first.

```bash
noust log search [OPTIONS] [WORDS]...
```

Arguments: `words`

| Option | What it does | Default |
|---|---|---|
| `--app` | Only this application (repeat). |  |
| `--not` | Leave out lines with this word (repeat). |  |
| `--since` | Start: 15m, 2h, 7d ago, a date or epoch seconds (1h). |  |
| `--until` | End, in the same forms (now). |  |
| `--level` | The worst level kept. |  |
| `--limit` | Most lines to print. | `200` |
| `-v`, `--verbose` | Show the detail of each step. |  |
| `--dry-run` | Rehearse without changing anything. Read-only checks still run. |  |
| `--no-color` | Never emit colour. |  |
| `--json` | Print the result as JSON. |  |
| `--reason` | Why this change is made (a change reference, a ticket). Recorded with the command in the audit log; required only where a compliance framework asks for it (ENS) or security.change_reasons is on. |  |

