Adds an Audit Logs collection to Payload and records operations on the collections you choose. Each entry stores the entity, document ID, operation, acting user, and the original and new data as JSON. Access to the logs and their visibility in the sidebar are configurable. Requires Payload 3.82.1 or newer.
Audit log plugin for Payload CMS
Installation
npm i payload-audit-logs6
Stars
0
Forks
0
Open Issues
6 months ago
Last Updated
66
Weekly Downloads
v1.2.0
npm Version
56.1 KB
Unpacked Size
0
Dependencies
6+2 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 6 |
| Dec 4, 2026 | 6 |
| Dec 3, 2026 | 6 |
| Dec 2, 2026 | 6 |
| Dec 1, 2026 | 6 |
| Nov 30, 2026 | 6 |
| Nov 29, 2026 | 6 |
| Nov 28, 2026 | 6 |
| Nov 27, 2026 | 6 |
| Nov 26, 2026 | 6 |
| Nov 25, 2026 | 6 |
| Nov 24, 2026 | 6 |
| Nov 23, 2026 | 6 |
| Nov 22, 2026 | 6 |
| Nov 21, 2026 | 6 |
| Nov 20, 2026 | 6 |
| Nov 19, 2026 | 6 |
| Nov 18, 2026 | 6 |
| Nov 17, 2026 | 6 |
| Nov 16, 2026 | 6 |
| Nov 15, 2026 | 6 |
| Nov 14, 2026 | 6 |
| Nov 13, 2026 | 6 |
| Nov 12, 2026 | 6 |
| Nov 11, 2026 | 6 |
| Nov 10, 2026 | 6 |
| Nov 9, 2026 | 6 |
| Nov 8, 2026 | 6 |
| Nov 7, 2026 | 6 |
| Nov 6, 2026 | 6 |
| Nov 5, 2026 | 6 |
| Nov 4, 2026 | 6 |
| Nov 3, 2026 | 6 |
| Nov 2, 2026 | 6 |
| Nov 1, 2026 | 6 |
| Oct 31, 2026 | 6 |
| Oct 30, 2026 | 6 |
| Oct 29, 2026 | 6 |
| Oct 28, 2026 | 6 |
| Oct 27, 2026 | 6 |
| Oct 26, 2026 | 6 |
| Oct 25, 2026 | 6 |
| Oct 24, 2026 | 6 |
| Oct 23, 2026 | 6 |
| Oct 22, 2026 | 6 |
| Oct 21, 2026 | 6 |
| Oct 20, 2026 | 6 |
| Oct 19, 2026 | 6 |
| Oct 18, 2026 | 6 |
| Oct 17, 2026 | 6 |
| Oct 16, 2026 | 6 |
| Oct 15, 2026 | 5 |
| Oct 14, 2026 | 5 |
| Oct 13, 2026 | 5 |
| Oct 12, 2026 | 4 |
| Oct 11, 2026 | 4 |
| Oct 10, 2026 | 4 |
| Oct 9, 2026 | 4 |
| Oct 8, 2026 | 4 |
| Oct 7, 2026 | 4 |
| Oct 6, 2026 | 4 |
| Oct 5, 2026 | 4 |
| Oct 4, 2026 | 4 |
| Oct 3, 2026 | 4 |
| Oct 2, 2026 | 4 |
| Oct 1, 2026 | 4 |
| Sep 30, 2026 | 4 |
| Sep 29, 2026 | 4 |
| Sep 28, 2026 | 4 |
| Sep 27, 2026 | 4 |
| Sep 26, 2026 | 4 |
| Sep 25, 2026 | 4 |
| Sep 24, 2026 | 4 |
| Sep 23, 2026 | 4 |
| Sep 22, 2026 | 4 |
| Sep 21, 2026 | 4 |
| Sep 20, 2026 | 4 |
| Sep 19, 2026 | 4 |
| Sep 18, 2026 | 4 |
| Sep 17, 2026 | 4 |
| Sep 16, 2026 | 4 |
| Sep 15, 2026 | 4 |
| Sep 14, 2026 | 4 |
| Sep 13, 2026 | 4 |
| Sep 12, 2026 | 4 |
| Sep 11, 2026 | 4 |
| Sep 10, 2026 | 4 |
| Sep 9, 2026 | 4 |
| Sep 8, 2026 | 4 |
| Sep 7, 2026 | 4 |
| Sep 6, 2026 | 4 |
50+24 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 50 |
| Dec 4, 2026 | 48 |
| Dec 3, 2026 | 46 |
| Dec 2, 2026 | 42 |
| Dec 1, 2026 | 38 |
| Nov 30, 2026 | 31 |
| Nov 29, 2026 | 28 |
| Nov 28, 2026 | 24 |
| Nov 27, 2026 | 24 |
| Nov 26, 2026 | 24 |
| Nov 25, 2026 | 28 |
| Nov 24, 2026 | 21 |
| Nov 23, 2026 | 22 |
| Nov 22, 2026 | 24 |
| Nov 21, 2026 | 23 |
| Nov 20, 2026 | 23 |
| Nov 19, 2026 | 27 |
| Nov 18, 2026 | 34 |
| Nov 17, 2026 | 34 |
| Nov 16, 2026 | 34 |
| Nov 15, 2026 | 38 |
| Nov 14, 2026 | 46 |
| Nov 13, 2026 | 45 |
| Nov 12, 2026 | 54 |
| Nov 11, 2026 | 43 |
| Nov 10, 2026 | 44 |
| Nov 9, 2026 | 43 |
| Nov 8, 2026 | 40 |
| Nov 7, 2026 | 32 |
| Nov 6, 2026 | 36 |
| Nov 5, 2026 | 22 |
| Nov 4, 2026 | 23 |
| Nov 3, 2026 | 26 |
| Nov 2, 2026 | 29 |
| Nov 1, 2026 | 28 |
| Oct 31, 2026 | 25 |
| Oct 30, 2026 | 20 |
| Oct 29, 2026 | 19 |
| Oct 28, 2026 | 15 |
| Oct 27, 2026 | 14 |
| Oct 26, 2026 | 12 |
| Oct 25, 2026 | 8 |
| Oct 24, 2026 | 9 |
| Oct 23, 2026 | 7 |
| Oct 22, 2026 | 10 |
| Oct 21, 2026 | 19 |
| Oct 20, 2026 | 15 |
| Oct 19, 2026 | 15 |
| Oct 18, 2026 | 20 |
| Oct 17, 2026 | 19 |
| Oct 16, 2026 | 29 |
| Oct 15, 2026 | 35 |
| Oct 14, 2026 | 38 |
| Oct 13, 2026 | 44 |
| Oct 12, 2026 | 43 |
| Oct 11, 2026 | 40 |
| Oct 10, 2026 | 41 |
| Oct 9, 2026 | 37 |
| Oct 8, 2026 | 35 |
| Oct 7, 2026 | 26 |
| Oct 6, 2026 | 21 |
| Oct 5, 2026 | 25 |
| Oct 4, 2026 | 27 |
| Oct 3, 2026 | 30 |
| Oct 2, 2026 | 35 |
| Oct 1, 2026 | 28 |
| Sep 30, 2026 | 25 |
| Sep 29, 2026 | 31 |
| Sep 28, 2026 | 27 |
| Sep 27, 2026 | 25 |
| Sep 26, 2026 | 23 |
| Sep 25, 2026 | 17 |
| Sep 24, 2026 | 33 |
| Sep 23, 2026 | 35 |
| Sep 22, 2026 | 38 |
| Sep 21, 2026 | 38 |
| Sep 20, 2026 | 44 |
| Sep 19, 2026 | 51 |
| Sep 18, 2026 | 56 |
| Sep 17, 2026 | 53 |
| Sep 16, 2026 | 61 |
| Sep 15, 2026 | 52 |
| Sep 14, 2026 | 54 |
| Sep 13, 2026 | 48 |
| Sep 12, 2026 | 40 |
| Sep 11, 2026 | 30 |
| Sep 10, 2026 | 20 |
| Sep 9, 2026 | 22 |
| Sep 8, 2026 | 21 |
| Sep 7, 2026 | 23 |
| Sep 6, 2026 | 26 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1216292583-root)<a href="https://payloaddirectory.dev/plugins/1216292583-root"><img src="https://payloaddirectory.dev/badge/1216292583-root.svg" alt="Payload Directory"></a>README
A Payload CMS plugin to automatically track and log CRUD operations (Create, Read, Update, Delete) on specified collections.
create, read, update, and delete operations.originalData (before change) and newData (after change) for full auditability.pnpm add payload-audit-logs
# or
npm install payload-audit-logs
# or
yarn add payload-audit-logs
Add the plugin to your Payload configuration:
import { buildConfig } from 'payload'
import { auditLogPlugin } from 'payload-audit-logs'
export default buildConfig({
plugins: [
auditLogPlugin({
collections: {
posts: {
operations: ['create', 'update', 'delete'],
},
users: {
operations: ['create', 'update', 'delete'],
},
media: {
operations: ['create', 'update', 'delete'],
},
},
userCollection: 'users', // Optional, defaults to 'users'
}),
],
// ... rest of your config
})
The plugin accepts the following options:
| Option | Type | Default | Description |
|---|---|---|---|
collections | Record<string, { operations: string[] }> | {} | A map of collection slugs to track and the operations to log for each. |
disabled | boolean | false | If true, the plugin will be disabled. |
userCollection | string | 'users' | The slug of the collection used for users. |
auditLogsAccess | CollectionConfig['access'] | { ... } | Access control functions for the generated Audit Logs collection. |
hideAuditLogs | boolean | ((args: { user: PayloadRequest['user'] | null }) => boolean) | false | Hide the Audit Logs collection from the sidebar navigation. |
You can specify which operations to log for each collection:
create: Logs when a new document is created.read: Logs when a document is retrieved.update: Logs when an existing document is modified.delete: Logs when a document is removed.CAUTION: Enabling the
readoperation can significantly increase database storage consumption and create redundant logs, especially for high-traffic collections. Use it sparingly and only when strictly necessary for auditing sensitive information.
import { buildConfig } from 'payload'
import { auditLogPlugin } from 'payload-audit-logs'
export default buildConfig({
plugins: [
auditLogPlugin({
// Track specific collections
collections: {
posts: {
operations: ['create', 'update', 'delete'],
},
// Sensitive data might require 'read' logging
settings: {
operations: ['read', 'update'],
},
},
// Configure user collection if it's not 'users'
userCollection: 'admins',
// Useful for environment-specific disabling
disabled: process.env.NODE_ENV === 'test',
}),
],
})
When the plugin is enabled, it automatically adds an Audit Logs collection to your Payload admin panel.
create, read, update, or delete).update and delete).create, read, and update).By default:
You can fully customize these rules by providing the auditLogsAccess property in your plugin configuration.
If you want to contribute or modify the plugin:
pnpm install.pnpm dev.pnpm test.MIT
activity log
Record create, update and delete activity on selected collections and globals in a dedicated log collection
87639/wk115v4
payload plugin whitehat
Security testing for Payload sites with severity-ranked alerts stored in the site's own database
73295/wk0v3
payload plugin audit log
Append-only audit log of document, global and auth changes with CSV and NDJSON export
72394/wk37v3
audit logs
Read-only audit trail of create, update, delete and login events with field-level diffs and sensitive-field redaction
67660/wk0v3
audit fields
Track who created and last modified each document, with a Modified By column in the versions view
62176/wk16v3
payload plugin audit
Audit trail for Payload collections that records who created or updated documents and stores update deltas
6134/wk1v3