Skip to main content
The audit log plugin records who changed each document, what changed, and when. Audit entries are available in the audit-logs collection and cannot be created, updated, or deleted through the API.

Installation

Configuration

By default, the plugin audits create, update, and delete operations for every configured collection. The plugin runs with order: 90, after plugins that add collections, so those collections are audited too wherever you list it. Each entry records the collection, operation, document ID, user, API key ID when available, timestamp, and a shallow changed-fields diff. Audit failures are logged without failing the original write.

Collection selection

Use an allowlist:
Or exclude selected collections:
Use operations to limit recorded operations:

Read access

Reading audit entries requires an authenticated user by default. Provide a FrogBot access function for stricter rules:
Internal audit writes always override access. API create, update, and delete access remains disabled.

Optional metadata

Enable request IP and user-agent capture:
Forwarded IP headers are ignored by default because clients can spoof them. If every request reaches FrogBot through a trusted proxy that replaces x-forwarded-for or x-real-ip, explicitly enable proxy trust:
trustProxy trusts the first x-forwarded-for value and falls back to x-real-ip. Do not enable it when clients can connect directly or when your proxy appends untrusted values instead of replacing the header. User-agent capture does not require proxy trust. Store full document snapshots for deletes or every operation:
The default snapshot mode is never.
Snapshots can store secrets, personal data, uploaded-content metadata, and other sensitive document fields. Enable them only after applying appropriate audit-log read access, retention, and data-handling controls.

Retention

Audit entries are retained indefinitely by default. Enable scheduled pruning with a retention window:
The cron defaults to midnight daily. FrogBot jobs must be running for scheduled pruning to execute.

Options