stepanenko3 / laravel-log-viewer
Fast and easy-to-use log viewer for your Laravel application
Installs: 57 425
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 2
Open Issues: 2
Requires
- php: ^8.0
- laravel/framework: ^9.0|^10.0|^11.0
- spatie/laravel-package-tools: ^1.16.2
- stepanenko3/laravel-helpers: ^1.3.2
- stepanenko3/laravel-pagination: ^1.0.3
Requires (Dev)
- phpstan/phpstan: ^1.10
- tightenco/duster: ^2.7
README
Description
Log Viewer version without UI and with some modifications
Features
- Without UI (Without frontend)
- Support subfolders
- Files sorting by name, size, modification time
- Using custom pagination
Requirements
php: >=8.0
Installation
composer require stepanenko3/laravel-log-viewer
Usage
use Stepanenko3\LaravelLogViewer\LogViewer; use Stepanenko3\LaravelLogViewer\LogFile; // Getting all log files LogViewer::getFiles(); // Get specific log file by name LogViewer::getFile('laravel.log'); // Clear cache of all files LogViewer::clearCacheAll(); // Download specific log file by name LogFile::download('laravel.log'); // Delete specific log file by name LogFile::delete('laravel.log'); // Clear cache for specific log file by name LogFile::clearCache('laravel.log'); // Query logs LogFile::get( selectedFileName: 'laravel.log', // File name query: 'exception[0-9]+', // Filter logs by regex query string selectedLevels: ['warning', 'alert'], // Filter logs by level page: 2, // Page perPage: 25, // Logs per page direction: LogFile::NEWEST_FIRST, // Logs order. NEWEST_FIRST::OLDEST_FIRST, );
Credits
Contributing
Thank you for considering contributing to this package! Please create a pull request with your contributions with detailed explanation of the changes you are proposing.
License
This package is open-sourced software licensed under the MIT license.