shaonmajumder/log-viewer
Beautiful, secure Laravel log viewer for Laravel 9–11 and PHP 8+. Auto-discovers log files, highlights levels, supports themes, search and level filtering, context expansion, tail mode, auto-refresh, and downloading full or filtered output.
Automatically detects:
laravel.loglaravel-YYYY-MM-DD.logColor-coded levels:
| Level | Highlight |
|---|---|
| ❌ ERROR | Red |
| ⚠️ WARNING | Yellow |
| ℹ️ INFO | Blue |
| 🐛 DEBUG | Gray |
Built-in dark theme options:
Dark Ink (default)Dark GraphiteDark ForestTheme can be changed directly from the viewer header, and the selection is saved in browser localStorage.
Expand surrounding lines around matches:
No Context±2±5±10±20Perfect for debugging stack traces and exceptions.
View latest logs instantly:
Download:
composer require shaonmajumder/log-viewer
Add to your Laravel app:
{
"repositories": [
{
"type": "path",
"url": "../log-viewer"
}
],
"require": {
"shaonmajumder/log-viewer": "*@dev"
}
}
Then run:
composer update shaonmajumder/log-viewer
php artisan vendor:publish --tag=log-viewer-config
Publish views:
php artisan vendor:publish --tag=log-viewer-views
| Route | Description |
|---|---|
/log-viewer |
Main log viewer |
/log-viewer/download |
Download logs |
Published config:
config/log-viewer.php
| Option | Description |
|---|---|
route_prefix |
Route prefix |
middleware |
Route middleware |
layout |
Blade layout |
heading |
Viewer heading |
Default behavior is fixed: only logged-in users can access /log-viewer.
/login.


src/
├── Http/
│ └── Controllers/
│ └── LaravelLogController.php
│
├── LaravelLogViewerServiceProvider.php
routes/
└── web.php
config/
└── log-viewer.php
resources/
└── views/
└── index.blade.php
⚠️ Never expose production logs publicly.
Recommended:
✅ Production Laravel apps
✅ Admin panels
✅ DevOps dashboards
✅ Debugging tools
✅ Monitoring systems
✅ Internal engineering tools
Most Laravel log viewers are:
This package focuses on:
✅ Developer Experience
✅ Security
✅ Performance
✅ Clean UI
✅ Real-world production usage
| Framework | Supported |
|---|---|
| Laravel 9 | ✅ |
| Laravel 10 | ✅ |
| Laravel 11 | ✅ |
| PHP Version | Supported |
|---|---|
| PHP 8+ | ✅ |
MIT © Shaon Majumder
If this package helps you:
How can I help you explore Laravel packages today?