Yii2 Audit ¶
Yii2 Audit is a module that records and displays web/cli requests, database changes, php/js errors and associated data.
Tracks minimal data in the base entry:
user_id- User ID of the visitor (if any), based on
ip- IP Address of the visitor.
request_method- The method used to generate the request, eg:
CLIfor console requests and
HEADfor web requests.
ajax- If the page was requested using ajax.
route- The controller and action of the request.
duration- How long the request took to serve.
memory_max- The peak memory usage during the request.
created- The datetime the entry was created.
Tracks additional data using configurable Panels. Each panel is optional, and you can even create your own.
RequestPanel- Tracks all incoming web and console request data:
- URL Information including the route and params.
- PHP SuperGlobals
- Headers from the Request and Response.
AssetPanel- Asset Bundles loaded for the request.
ConfigPanel- Yii and PHP configuration that was used for the request.
DbPanel- SQL queries.
ErrorPanel- Record all PHP exceptions and errors in the background. Once logged you can configure a cron task to email the errors to a developer so issues can be fixed before they are even reported by a user.
LogPanel- Yii logs.
MailPanel- Emails that were sent during the request
ProfilingPanel- Application profiling information.
TrailPanel- Database changes that were made during the request using the
ExtraDataPanel- Extra data that you want to store.
YourOwnPanel- Create your own panel to capture any data you want.
Installs as a simple module so it can be added without any hassle.
You can either track specific actions and nothing else or exclude specific routes from logging (wildcard supported).
View your data. The module contains a nice viewer that is automatically made available when you add it to your configuration. It has configurable permissions to limit access to this functionality by IPs, roles or users.
For changes since the last version see the Changelog.
Entry View ¶
Trail Panel ¶
Database Panel ¶
Log Panel ¶
Profiling Panel ¶
Error Panel ¶
Thanks to everyone who has contributed.
BSD-3 - Please refer to the license.