PHP code example of error-tracker / cake-log-target

1. Go to this page and download the library: Download error-tracker/cake-log-target 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/ */

    

error-tracker / cake-log-target example snippets


/**
 * Configures logging options
 */
'Log' => [
    'debug' => [
        'className' => 'Cake\Log\Engine\FileLog',
        'path' => LOGS,
        'file' => 'debug',
        'levels' => ['notice', 'info', 'debug'],
        'url' => env('LOG_DEBUG_URL', null),
    ],
    'error' => [
        'className' => 'Cake\Log\Engine\FileLog',
        'path' => LOGS,
        'file' => 'error',
        'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
        'url' => env('LOG_DEBUG_URL', null),
    ],
    'error_tracker' => [
        'className' => 'ErrorTracker\Cake\LogTarget',
        'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
        'app_key' => 'YOUR_APP_KEY',
    ],
],