https://github.com/mazfreelance/yii2-audit
Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
https://github.com/mazfreelance/yii2-audit
audit-log audit-trail yii2 yii2-extension
Last synced: 18 days ago
JSON representation
Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
- Host: GitHub
- URL: https://github.com/mazfreelance/yii2-audit
- Owner: mazfreelance
- License: other
- Fork: true (bedezign/yii2-audit)
- Created: 2021-11-02T07:40:31.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T01:15:03.000Z (about 2 years ago)
- Last Synced: 2024-09-18T22:09:43.233Z (about 1 year ago)
- Topics: audit-log, audit-trail, yii2, yii2-extension
- Language: PHP
- Homepage: https://packagist.org/packages/mazfreelance/yii2-audit
- Size: 1.94 MB
- Stars: 2
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# NOTE
- Initially based on [bedezign/yii2-audit](https://github.com/bedezign/yii2-audit) that seems to be abandoned.
- For changes since the last version see the [Changelog](https://github.com/mazfreelance/yii2-audit/blob/master/CHANGELOG.md).
- For documention can refer [Documentation Guide](https://bedezign.github.io/yii2-audit/docs/)
--------------------------------------
# Yii2 Audit## Installation via Composer
To install simply run:
```
composer require mazfreelance/yii2-audit
```## Documentation
Getting started? Try the [Installation Guide](https://bedezign.github.io/yii2-audit/docs/installation/). You will find further information in the [Documentation](https://bedezign.github.io/yii2-audit/docs/).
[](https://gitter.im/bedezign/yii2-audit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://github.com/mazfreelance/yii2-audit/releases/tag)
[](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md)
[](https://travis-ci.org/bedezign/yii2-audit)
[](http://hhvm.h4cc.de/package/bedezign/yii2-audit)
[](https://scrutinizer-ci.com/g/bedezign/yii2-audit/code-structure)
[](https://scrutinizer-ci.com/g/bedezign/yii2-audit)
[](https://packagist.org/packages/bedezign/yii2-audit)
[](http://www.yiiframework.com/extension/yii2-audit)Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
## Abandoned
It was probably already clear, but I'm not able to support this project anymore.
I gave up Yii(2) for Laravel almost 6 years ago. Haven't even been using PHP for the last 3 years.
So, if anyone supporting one of the forks wants to take lead on this project, let me know and we can probably work something out.## PHP7.2 & Yii 2.0.13 or later
From `PHP 7.2` on `Object` became a reserved keyword.
Since enough time went by, we decided to assume everyone is on 7.2 and Yii 2.0.13 by now we won't be keeping
`1.0.*`-branch (pre PHP 7.2) up to date anymore.Please use version `1.1.*` or later.
## Features
### Powerful, yet Simple
* 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.### Minimal Footprint
Tracks minimal data in the base entry:
* `user_id` - User ID of the visitor (if any), based on `Yii::$app->user->id`.
* `ip` - IP Address of the visitor.
* `request_method` - The method used to generate the request, eg: `CLI` for console requests and `GET`, `POST`, `DELETE`, `PUT`, `PATCH`, `OPTIONS` or `HEAD` for 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.### Log 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 `$_GET`, `$_POST`, `$_SERVER`, `$_FILES` and `$_COOKIES`.
* 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. [more info](https://bedezign.github.io/yii2-audit/docs/error-panel/)
* `JavascriptPanel` - Automatically log JavaScript errors. Errors and warning are logged automatically by including `JSLoggingAsset` asset bundle. The javascript component also provides methods to manually add logging entries. [more info](https://bedezign.github.io/yii2-audit/docs/javascript-panel/)
* `LogPanel` - Yii logs.
* `MailPanel` - Emails that were sent during the request. [more info](https://bedezign.github.io/yii2-audit/docs/mail-panel/)
* `ProfilingPanel` - Application profiling information.
* `TrailPanel` - Database changes that were made during the request using the `AuditTrailBehavior`. [more info](https://bedezign.github.io/yii2-audit/docs/trail-panel/)
* `ExtraDataPanel` - Extra data that you want to store. [more info](https://bedezign.github.io/yii2-audit/docs/extra-data-panel/)
* `CurlPanel` - Track your applications cURL requests (including replies, log and headers) [more info](https://bedezign.github.io/yii2-audit/docs/curl-panel/)
* `YourOwnPanel` - Create your own panel to capture any data you want. [more info](https://bedezign.github.io/yii2-audit/docs/custom-views-panel/)## Screenshots
### Dashboard
### Entry View
### More Screenshots
More images are available from the [Screenshots](https://bedezign.github.io/yii2-audit/screenshots/) page.
## Contributing
Contributions are welcome. Please refer to the [contributing guidelines](https://github.com/bedezign/yii2-audit/blob/master/CONTRIBUTING.md).
Thanks to [everyone who has contributed](https://github.com/bedezign/yii2-audit/blob/master/CREDITS.md).
## Project Resources
* [Project Homepage](https://bedezign.github.io/yii2-audit/)
* [Live Demo](https://yii2-audit.herokuapp.com/)
* [GitHub Project](https://github.com/bedezign/yii2-audit)
* [Yii2 Extension](http://www.yiiframework.com/extension/yii2-audit)
* [Packagist Package](https://packagist.org/packages/bedezign/yii2-audit)
* [Travis CI Testing](https://travis-ci.org/bedezign/yii2-audit)
* [Scrutinizer CI Code Quality](https://scrutinizer-ci.com/g/bedezign/yii2-audit)## License
BSD-3 - Please refer to the [license](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md).
