Download the PHP package matfish/craft-activity-log without Composer

On this page you can find all versions of the php package matfish/craft-activity-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-activity-log

Craft Activity Log

activity_logs

This plugin provides a detailed activity log for incoming web requests.

Requirements

This plugin requires Craft CMS 4.x or later.

Installation

  1. Include the package:

  2. Install the plugin:

Usage

Once the plugin is installed Craft will start recording all requests, excluding Control Panel AJAX requests (except for Login request). Data points include:

The user can control which request types to record under the Settings page.

Screenshot 2023-07-05 122540

Advanced Request Filtering

For a more fine-grained control, on top of request type settings, you can use the requestFilter setting:

  1. In your project create a config/activity-logs.php file
  2. Define a requestFilter callback that returns a boolean. E.g:

The $this object in this context will be an instance of the request class (craft\web\Request). Only requests satisfying the condition (returning true) will be recorded.

View Filtering

While reqestsFilter allows you to control which requests are being recorded to the database, at times, you may wish to filter some recorded requests from the viewable audit trail for specific users, either due to permissions or in order to reduce the cognitive load of parsing unnecessary data. This can be accomplished using the viewFilters setting, following the same structure as the example below:

Users not included in any of the array items will be shown the full audit trail as per usual.

Action Requests

Controller Actions are automatically labelled using a naming convention. E.g ["fields","save-group"] will become "Fields Save Group". This is relevant for the "Action" search dropdown on the Logs page and for the Actions widget on the Statistics page. In addition the user can optionally override this convention by giving explicit labels to recorded actions under the Actions page.

Screenshot 2023-07-05 123908

Audit Trail UI

Requests can be viewed and filtered under the Activity Log page. Click the "Columns" button to add or remove columns from the table on the fly:

craft4 test_adminos_activity-logs_site=default

Note that most columns have a dedicated filter attached to them (except for date range at the top of the table).

Click the "+" sign on the left-hand side of each row to expand a child row containing the full request data:

craft4 test_adminos_activity-log_site=default (4)

Payload Filtering

The plugin automatically replaces the CSRF Token and any payload key which contains the word "password" with a "[filtered]" mask. You can add additional keys to be filtered in two ways:

a. General: Add it to the filterPayloadKeys on the setting file:

b. Specific: If you only want to filter a certain key from specific requests you can use the filterPayloadCallbacks array instead, e.g:

Payload Search

By default, searching in request payload is disabled in order to remove unnecessary clutter from the table controls. You can enable it in the Settings Page. Screenshot 2023-07-05 122958

Note that you need to press enter or leave the field for the search to be triggered.

Statistics

activity_logs_stats The statistics page provides some insights gleaned from the raw data. Similar to Craft's dashboard widgets, you can add and remove widgets, as well as change the order and the column span. The data can be filtered by:

  1. Date Range
  2. Site Id
  3. User Id
  4. Is Ajax?
  5. Is Cp? (Control Panel Request)

If you have an idea for additional widget(s) please open a new feature request.

Pruning Data

You can prune (delete) data before that last X days using the following console command:

If omitted the days option defaults to 30 days.

Note: If you are running the command as a cron job add the --interactive=0 option to disable manual confirmation

License

You can try Activity Log in a development environment for as long as you like. Once your site goes live, you are required to purchase a license for the plugin. License is purchasable through the Craft Plugin Store.

For more information, see Craft's Commercial Plugin Licensing.


All versions of craft-activity-log with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^4.0.0
ext-json Version *
nesbot/carbon Version ^2.58
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package matfish/craft-activity-log contains the following files

Loading the files please wait ....