Admin Activity Log
Module: Magenx_AdminActivity · admin only
Magento Open Source has no record of who changed what in the admin. This module adds one: every change, field by field, with who made it, when, from which IP address and browser. When several people share an admin, “who deleted that CMS block?” finally has an answer.

What is recorded
Section titled “What is recorded”| Changes | Add, edit, delete, print, view and mass update of tracked records. |
| Field detail | Old and new value of every field that changed. |
| Logins | Successful logins, failed attempts (with the username tried) and logouts. |
| Context | IP address, browser, admin user, admin role, page and URL. |
| AI and integrations | Changes made through the AI MCP Connector, with the connector and role behind them. |
| Page visits | One row per admin page view. Off by default. |
Tracked out of the box: products, categories, product attributes, CMS pages and blocks, customers, customer groups, orders, admin users and roles, stores, store groups, websites, cart and catalog price rules, tax rules, and configuration values.
Using the log
Section titled “Using the log”Open System > Admin Activity Log. The grid can be filtered and exported. Each row opens the full context and a field / old value / new value table.
- The log is read-only. Nothing can be deleted from the admin; rows leave only through the retention cleanup.
- The IP filter is an exact match: type the whole address.
- A mass action over more than 200 records writes one summary row with the count.
- Logging never blocks the action it records. A logging failure is written to
var/log/magenx_admin_activity.log.

Privacy and secrets
Section titled “Privacy and secrets”- Passwords, reset tokens, API keys, secrets, private keys and card data are never stored. The field name is logged and both values show
***. - Encrypted configuration values, and configuration paths that look like secrets, are masked the same way.
- The admin URL secret key and secret-looking query parameters are removed from stored URLs.
- For failed logins only the username is stored, never the password tried.
User flows
Section titled “User flows”Admin edits a record
- An admin saves a product, changing its price and name.
- Once the save is committed, one edit activity with two details is recorded, with user, role, address, browser, action and address of the page.
- A save that is rolled back leaves no entry.
Mass action
- An admin updates 50 products at once: 50 activities are recorded together.
- Above 200 records in one request, a single summary entry names the count instead.
Sign-in events
- A sign-in records an entry once per session (not on re-authentication prompts).
- A failed attempt records the username tried and a generic reason — never the password.
- A sign-out records an entry naming the user.
External change
- An agent updates a product on behalf of admin "alice" through connector "X" with role "Catalog".
- The change is recorded with source = the agent channel, the connector and the role.
- Ordinary storefront saves are never logged.
Review
- A permitted user opens the log, filters by user, action, record type, source or exact address, and exports.
- Opening an entry shows the request context and the field / old / new table.
- Nothing can be edited or deleted from the screen.
Retention
- A scheduled job deletes entries older than the window in bounded batches, details included.
These always hold:
- An entry exists only for a change that was committed.
- No secret (password, token, key, private key, card data, encrypted setting, setting whose path names a secret) is ever stored.
- Entries cannot be changed or removed from the admin.
- All entries of one request are stored together or not at all.
- A stored record type is only ever acted on if it is on the tracked list.
- A field is in the diff only if old and new values differ after normalising (no change from "1" to 1).
- Protected = exact names on the protected list, names or setting paths containing a protected pattern (case-insensitive), and every encrypted setting. Name kept, both values
***. - Values longer than 128 KB are cut on a byte budget without splitting a multi-byte character.
- "Who changed X" is answerable for every tracked type within the retention window.
- Entries show the role that authorised the change at the time.
Edge cases
Section titled “Edge cases”| Situation | What happens |
|---|---|
| Save rolled back. | No entry. |
Mail password stored as a plain setting named …_password. | Masked by pattern. |
Page address contains ?api_key=…. | Stored as ***. |
| "Select all" on 10,000 products. | One summary entry. |
| 300 KB field value. | Cut at 128 KB, valid text. |
| Database error while logging. | Admin action succeeds; error written to the module's log. |
| Entry tampered to name another record type. | Ignored, never acted on. |
| Re-authentication prompt. | No second sign-in entry. |
| Cleanup has not run for months. | Deletes in bounded batches. |
Who it applies to
Section titled “Who it applies to”- Admin-panel actions on tracked types; external callers only inside an actor scope.
Out of scope
Section titled “Out of scope”- Rolling a change back from the log.
- Logging storefront shopper actions.
- Real-time alerting.
- Changes made directly in the database or from the command line.
- Per-store settings (the admin panel is global).
Install
Section titled “Install”composer require magenxcommerce/module-admin-activitybin/magento module:enable Magenx_AdminActivitybin/magento setup:upgradebin/magento setup:di:compile # production mode onlybin/magento cache:flush- PHP
~8.4.0||~8.5.0, Magento 2.4.8.
Configuration
Section titled “Configuration”All settings are global: the admin is not a store view.
Stores > Configuration > Magenx > Admin Activity
General
| Setting | Default | Scope | Notes |
|---|---|---|---|
Enable Admin Activity Logsmagenx_admin_activity/ | Yes | Global | Yes/No. Master switch. Off means nothing is recorded; existing records are kept. |
Record Login Activitymagenx_admin_activity/ | Yes | Global | Yes/No. Shown when Enable Admin Activity Logs = Yes. Successful logins, failed attempts and logouts, each with the IP address behind them. |
Record Page Visitsmagenx_admin_activity/ | No | Global | Yes/No. Shown when Enable Admin Activity Logs = Yes. Off by default. Enable only if you need admin navigation history: it writes one row per admin page view, which on a busy install is by far the largest source of rows in the log. |
Clear Admin Activity Logs After (days)magenx_admin_activity/ | 90 | Global | Text. Records older than this are deleted by cron. 0 keeps everything forever. |
Cleanup Schedulemagenx_admin_activity/ | 0 3 * * * | Global | Text. Shown when Enable Admin Activity Logs = Yes. Cron expression for the cleanup job, e.g. 0 3 * * * for 3am daily. |
Admin pages and permissions
Section titled “Admin pages and permissions”- System > Admin Activity Log
Grant these under System > Permissions > User Roles > Role Resources:
| Resource | Under | ID |
|---|---|---|
| Admin Activity Log | System | Magenx_AdminActivity::activity |
| Admin Activity Settings | Stores > Settings > Configuration | Magenx_AdminActivity::config |
| Job | Group | Default schedule | Change it at |
|---|---|---|---|
magenx_admin_activity_clean | default | 0 3 * * * | magenx_admin_activity/general/cleanup_schedule |
Glossary
Section titled “Glossary”| Term | Meaning |
|---|---|
| Activity | One log entry: an action on a record, a sign-in event or a page visit. |
| Detail | One changed field of an activity: name, old value, new value. |
| Tracked record type | A kind of record whose changes are logged (product, category, customer, order, page, rule, user, setting…). |
| Action type | add, edit, delete, view, print, mass update, sign-in, failed sign-in, sign-out, page visit. |
| Protected field | A field whose name is logged but whose values are replaced by ***. |
| Skipped field | A field never logged (noise such as "updated at"). |
| External actor | An integration or agent that declares whom it acts for. |
| Source | Where the change came from: the admin panel, or the external caller's name. |
| Retention window | Days an entry is kept; 0 = forever. |