# Audit Logging
FileMage Gateway maintains a audit log of executed user commands. This makes it easy to see when and by who files are created or modified.
# Viewing Audit Logs
To view audit logs:
- Click Logs in the sidebar.
To filter audit logs:
- Click Add filter.
- Select one of User, Path, or Operation.
- Enter the value to filter by, the click Apply.
- Repeat to add additional filters.
To remove a filter:
- Click on the X next to filter tag.
To modify the date range:
- Click on the date range on the top right.
- Select a start date in the date picker.
- Select a end date in the date picker.
- Click Apply.
To export audit logs:
- Click on Export. A JSON file be downloaded.
# Audit Log Retention
The number of days of audit events that are stored is controlled by the configuration parameter audit_retention_days. We recommend setting this parameter based your estimated workload and available disk space. On average, each 1 million audit events stored will consume 1gb of disk space.