PHP code example of kssadi / log-tracker

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

    

kssadi / log-tracker example snippets


return [
    'route_prefix' => 'log-tracker',
    'middleware' => ['web', 'auth'],
    'log_levels' => [
        'emergency' => ['color' => '#DC143C', 'icon' => 'fas fa-skull-crossbones'], 
        'alert'     => ['color' => '#FF0000', 'icon' => 'fas fa-bell'],             
        'critical'  => ['color' => '#FF4500', 'icon' => 'fas fa-exclamation-triangle'], 
        'error'     => ['color' => '#FF6347', 'icon' => 'fas fa-exclamation-circle'],   
        'warning'   => ['color' => '#FFA500', 'icon' => 'fas fa-exclamation-triangle'], 
        'notice'    => ['color' => '#32CD32', 'icon' => 'fas fa-info-circle'],         
        'info'      => ['color' => '#1E90FF', 'icon' => 'fas fa-info-circle'],         
        'debug'     => ['color' => '#696969', 'icon' => 'fas fa-bug'],                 
        'total'     => ['color' => '#008000', 'icon' => 'fas fa-file-alt'],            
    ],

    'per_page' => 50,
    'max_file_size' => 50,
    'allow_delete' => false,
    'allow_download' => true,
];



'daily' => [
    'driver' => 'daily',
    'path' => storage_path('logs/laravel.log'),
    'level' => env('LOG_LEVEL', 'debug'),
    'days' => 30, // Keep logs for the last 30 days
],