Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Log retention

For administrators of public sites - how Exponential rotates and prunes its logs, the age limits that ship for 404, security and CSP logs, why other kernel logs have none by default, and how to set MaxAgeDays per log…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/privacy/log-retention.md

On this page

Log retention

This page is for administrators and hosting teams. Logs contain personal data (masked addresses, user agents, URLs). Exponential rotates every log by size; only the request logs have age limits by default. The project lists "logs without an age limit by default" as a known gap (Privacy standards: Known gaps).

Note This page describes features and common practice; it is not legal advice. Check the law that applies to your organization with your legal counsel.

Contents

  1. How rotation works
  2. The defaults
  3. Setting age limits
  4. Pruning on a schedule
  5. Logs outside Exponential
  6. Related pages

How rotation works

When a log outgrows site.ini [FileSettings] LogFileMaxSize (2 MB), the next write rotates it: .1 becomes .2 and so on, and archives beyond LogFileRotateCount (3) are removed. A prune removes archives beyond the count and older than the age limit; a rotation never removes by age (Log rotation).

The defaults

LogArchivesAge limit
404.log5, compressed, 10 MB each30 days
security.log5, compressed, 10 MB each90 days
csp.log5, compressed, 10 MB each30 days
error.log, warning.log, notice.log, debug.log, auth.log, storage.log, cronjob and extension logs3, by sizenone (LogFileMaxAge=0)

Setting age limits

Per log, by its key (the key of the log viewer's permalinks, such as error, auth, site-storage):

# settings/override/logviewer.ini.append.php
[RotationSettings]
MaxAgeDays[error]=90
MaxAgeDays[auth]=90
MaxAgeDays[notice]=30
Compress[error]=enabled

or one limit for every log without its own entry, in settings/override/site.ini.append.php:

[FileSettings]
LogFileMaxAge=90

Choose the values with your DPO: long enough to investigate incidents, short enough for storage limitation.

Pruning on a schedule

Age limits act when a prune runs:

./console exp:logs --archives --allow-root-user          # each log, its archives, sizes and limits
./console exp:logs --prune --dry-run --allow-root-user   # what would go
./console exp:logs --apply --prune --allow-root-user             # remove it

Or the cronjob part logs (in no default group, so add it), as the site's user:

15 3 * * * cd /path/to/exponential && php runcronjobs.php -q logs

Rotations and prunes are recorded in the audit as system.log.rotate and system.log.delete. If the system's logrotate manages var/log instead, set LogFileRotateCount=0 so the kernel does not rotate as well.

Logs outside Exponential

The web server's and PHP-FPM's logs, Velocity's logs and the mail server's logs are rotated by their own programs; set their retention there or ask your host. request-shield's log (var/request-shield/log/shield.log) is rotated by the shield at the size its rule file sets (log-max-size).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x