PHP code example of iyogesharma / log-viewer

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

    

iyogesharma / log-viewer example snippets


// config/log-viewer.php
'theme' => 'observatory', // or 'console'

// config/log-viewer.php
'streaming' => [
    'enabled'               => true,
    'max-inline-bytes'      => 2 * 1024 * 1024,  // 2 MB
    'index-path'            => null,              // beside logs by default
    'tail-bytes'            => 25 * 1024 * 1024, // bounded cold-file fallback
    'max-build-concurrency' => 2,
],

'index-path' => storage_path('framework/log-viewer-indexes'),

'delete' => false,

'delete' => (bool) env('LOG_VIEWER_ALLOW_DELETE', false),
bash
php artisan vendor:publish --provider="Arcanedev\LogViewer\LogViewerServiceProvider"
bash
php artisan log-viewer:index 2026-07-23