# ADR-003: Application log retention

- Status: Accepted
- Date: 2024-05-20
- Decided by: Tobias Okonjo, with Priya Ramanathan

## Context

Every Ferrylog service writes structured logs. Until now they went to the hosts' disks and were lost
whenever a host was replaced. Support needs logs to answer operators' questions about failed
bookings, and engineers need them to investigate incidents. Logs also contain passenger names and the
last four digits of cards, so keeping them longer than needed is a privacy cost.

## Decision

All services ship logs to object storage in the primary region. Application logs, including payment
logs, are kept for 30 days and then deleted automatically. Access is limited to the platform team and
the support lead, and every read is recorded.

## Consequences

- Investigations and support answers can use any log from the last 30 days.
- Anything older is gone; a question about an older booking has to be answered from the database.
- Storage cost stays small and predictable.
