# Logging (/docs/v0.1/using/logging)



Logging is off by default. When enabled, koshi writes one file per session:

```text
logs/koshi-log-<session-id>.log
```

The `logs/` directory lives below koshi's platform state directory. Disabled
logging creates no file.

## Configure [#configure]

```kdl title="koshi.kdl"
version 1

logging {
    enabled #true
    level "warning"
    format "pretty"
}
```

| Setting   | Values                             | Default     |
| --------- | ---------------------------------- | ----------- |
| `enabled` | `#true` / `#false`                 | `#false`    |
| `level`   | `"info"` / `"warning"` / `"error"` | `"warning"` |
| `format`  | `"pretty"` / `"json"`              | `"pretty"`  |

`info` includes normal lifecycle events. `warning` adds recoverable problems.
`error` keeps only failures that stop koshi. Each level includes more severe
events.

`pretty` is human-readable. `json` writes one JSON object per line for tools to
parse.

## Privacy [#privacy]

Logs include ids, lifecycle events, errors, and byte counts. They do not store
typed input or copied terminal text.

Remove old logs with the platform cleanup steps on the
[Uninstall](/docs/v0.1/uninstall) page.
