Nowadays, when building an eCommerce website, enterprises and store owners always want to keep their websites safe from the risk of being attacked by hackers. They need a solution for better website security.
Thus, Magento 2 provides the Admin Action Log feature to make the management process easier.
In this tutorial, we will show you everything you need to know about how to configure admin action logs in Magento 2 store.
What are the Action Logs in Magento?
Table of Contents
Action Logs in Magento 2 track every change made by admin users in the store’s backend. They record details such as the action performed, the admin user, success or failure status, object ID, IP address, and timestamp. This helps store owners monitor modifications and ensure security.
By default, all admin actions are logged, but merchants can customize which actions to track. This feature enhances accountability, prevents unauthorized changes, and supports compliance requirements. Combined with proper admin role management, Action Logs help maintain a secure and well-managed Magento store.
How to Configure Admin Action Logs in Magento 2: The Comprehensive Guide
Configure Magento Admin Action Logging
For most admin actions, the logged information includes the action, whether the action was a success or failure, the name of the admin who acted, and the ID of the object on which the action was performed. It also logs the IP address and date data.
To configure this feature, on the Admin sidebar, go to
STORES > Configuration > ADVANCED > Admin > Admin Actions Logging.
Action Logs Report
Action Logs Report is a report that displays in detail all admin actions that are enabled for logging.
Each record is time-stamped, and it logs the IP address and name of the admin. The log detail includes the admin user and related changes the admin made during the action.
You must enable actions that you want to display in the report in the Admin Actions Logging settings.
To view the Action Log Report, go to System > Action Logs > Report.
The Action Logs Report includes the following information:
- Time: The date and time the action occurred
- Action Group: The action type correlates to the actions enabled on Admin Actions Logging
- Action: The action that was logged
- IP Address: The IP address for the computer on which the action was performed
- Username: The login ID for the admin user who performed the action
- Result: The success or failure of the action
- Full Action Name: The backend action name
- Details: The backend action category
- Full Details: All logged details of the admin action
To view the full details of a specific admin action, click View.
In the Action Logs Report, you can filter the options fields you want to display.
You can export the Action Logs Report in the CSV or Excel XML format.
Configure the Log Archive
The Admin Actions archive lists all the CSV log files that are stored on the server. You can set up how long the log entries are stored and how often they are archived in the configuration.
By default, the file name includes the current date and time in ISO format: yyyyMMddHH
Note that log archiving requires a cron job to be set up.
To configure the Log Archive, go to Store > Configuration> Advanced> System.
Expand the Admin Actions Log Archiving section to set these two options:
- Log Entry Lifetime, Days: Enter the number of days that you want to keep the log entries in the database before they are deleted.
- Log Archiving Frequency: Set to Daily, Weekly, or Monthly.
To view the Archive, go to System > Actions Logs > Archive.
Bulk Actions Log
The Bulk Actions Log records the details of asynchronous mass operations that run in the background, such as import/export or assigning custom prices to multiple products in the shared catalog.
To configure bulk action, go to Stores > Configuration > Advanced > System.
Expand the Bulk Actions section to set up the log save option:
- Day Saved in Log: Enter the number of days that bulk actions are saved in a log.
To view bulk actions, go to System > Actions Logs > Bulk Actions.
Best Solution to Managing Admin Action Log in Magento 2
The Admin Action Log is a must-have feature for the Magento website.
However, as we mentioned before, currently, Magento only supports this feature for the Magento EE version.
If you are using the Magento CE version, don’t worry, we have the solution for you:
Magento 2 Admin Action Log by BSS
This extension enables you to manage all admin activities.
Using this module also helps you shield off wrongful setups. It allows you to select objects to log actions when any admin users perform in the backend and revert admin changes with a simple click.
Full list of features:
- Set up which types of admin actions get automatically recorded and reported
- Revert admin changes with a simple click
- Track all admin working sessions from start to finish and be active in real-time
- Keep track of admin navigation history
- Organize logs in the grid view
- Place the time window for clearing logs
Conclusion
To maintain security, track changes, and ensure accountability in your store’s backend, it is crucial to configure admin Action Logs in Magento 2. By enabling and customizing action logging, store owners can effectively monitor admin activities, detect unauthorized modifications, and enhance overall store management.
With Magento 2’s built-in logging feature and third-party extensions for magento, you can tailor the logging settings to fit your security needs. Regularly reviewing action logs and combining them with proper admin permissions will help safeguard your store from potential risks, ensuring a smooth and well-controlled eCommerce operation.