sultanul-arefin / log-viewer
See laravel logs with more beautiful and flexible way
Package info
github.com/Sultanul-Arefin/laravel-log-viewer
Language:Blade
pkg:composer/sultanul-arefin/log-viewer
README
A lightweight, secure, and beautiful Laravel log viewer. Easily monitor your application logs, search through entries, and view stack traces without leaving your browser.
Features
- ๐ View Logs: Read your
laravel.logfile in a clean, tabular format. - ๐ Search & Filter: Filter logs by message or level (Info, Error, Warning, etc.).
- ๐ Pagination: Support for large log files with customizable row counts (10-50 per page).
- ๐ Secure Access: Built-in email-based authentication gate.
- ๐งน Clear Logs: One-click functionality to empty your log file.
- ๐ฑ Responsive: Fully responsive UI built with Tailwind CSS.
Installation
You can install the package via composer:
composer require sultanul-arefin/log-viewer
For Laravel 11+
Add the service provider to your bootstrap/providers.php file:
return [ // ... SultanulArefin\LogViewer\LogViewerServiceProvider::class, ];
For Laravel 10 and Below
Add the service provider to your config/app.php file:
'providers' => [ // ... SultanulArefin\LogViewer\LogViewerServiceProvider::class, ],
Security Configuration
To protect your logs from unauthorized access, this package uses an email verification gate.
Add the authorized emails to your .env file, separated by commas:
LOG_VIEWER_EMAILS=admin@example.com,developer@yourdomain.com
Usage
Once installed, you can access the log viewer at:
your-domain.com/log-viewer
Authentication Flow
- Redirection: Upon visiting the URL, you will be redirected to a verification page.
- Verification: Enter an email address that is listed in your
LOG_VIEWER_EMAILSenv variable. - Access: If valid, a session is created, and you gain access to the dashboard.
- Logout: Click the Logout button to securely clear your session.
Customizing the View (Optional)
If you wish to customize the look and feel of the log viewer, you can publish the views:
php artisan vendor:publish --tag="log-viewer-views"
The files will be copied to:
resources/views/vendor/log-viewer
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
Contributing
Contributions are welcome!
If you have a feature request or find a bug, please open an issue or submit a pull request.
Credits
- Author: Sultanul Arefin
- All Contributors
License
The MIT License (MIT). Please see the LICENSE file for more information.