PHP code example of superbig / craft-audit

1. Go to this page and download the library: Download superbig/craft-audit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

superbig / craft-audit example snippets



return [
    // How many days to keep log entries around
    'pruneDays'          => 30,

    // Enable logging
    'enabled'            => true,

    // Toggle specific event types
    'logElementEvents'            => true,
    'logChildElementEvents'       => false,
    'logDraftEvents'              => false,
    'logPluginEvents'             => true,
    'logUserEvents'               => true,
    'logRouteEvents'              => true,

    
    // Prune old records when a admin is logged in
    'pruneRecordsOnAdminRequests'          => false,

    // Enable geolocation status
    'enabledGeolocation' => true,
    'maxmindLicenseKey' => '',
    
    // Where to save Maxmind DB files
    'dbPath' => '',
];