---
title: "logs in config.yaml"
url: https://devlanes.run/docs/reference/config/user/logs/
description: "Reference for the logs key in ~/.devlanes/config.yaml."
---

# logs in config.yaml

A top-level key of [`~/.devlanes/config.yaml`](/docs/reference/config/user/).

## `logs`

Type: mapping.

How much service output devlanes keeps under `~/.devlanes/logs`, by age and total size.

```yaml devlanes-user
logs:
  retention:
    days: 7
    max_size: 5GiB
```

### `logs.retention`

Type: mapping.

Age and total-size limits for stored service output; a cleanup every 10 minutes deletes the oldest output past either one. Defaults to 7 days and `5GiB`.

```yaml devlanes-user
logs:
  retention:
    days: 7
    max_size: 5GiB
```

### `logs.retention.days`

Type: integer. Default: `7`.

Delete output older than this many days, along with its index entries in the database; defaults to 7 and must be at least 1. The newest log file of each stopped service is kept.

```yaml devlanes-user
logs:
  retention:
    days: 7
```

### `logs.retention.max_size`

Type: [byte size](/docs/reference/config/#byte-sizes). Default: `5GiB`.

Total size of stored output across all projects and lanes; defaults to `5GiB` and must be above zero. Over it, the oldest output goes first wherever it is, but each stopped service's newest file and up to 1 MiB of a running service's current file are kept.

```yaml devlanes-user
logs:
  retention:
    max_size: 5GiB
```
