endanguyen/laravel-logviewer
Laravel 5/4.2 and Lumen log viewer. Install via Composer, register the service provider, and add a route to LogViewerController to browse local log files in the browser. No public assets or vendor routes; works with and without log rotation.
storage/logs/laravel.log). May require customization for structured logging (e.g., JSON) or multi-file setups.Route::get('/logs', 'LogViewerController')), which may conflict with existing routes or require middleware (e.g., auth, rate-limiting).laravel-2023-10-01.log). May miss logs post-rotation./logs accessible to anyone).composer require endanguyen/laravel-logviewer.routes/web.php:
Route::get('/logs', 'LogViewerController');
Route::get('/logs', 'LogViewerController')->middleware('auth');
/logs endpoint.LogViewerController to add features (e.g., search, redaction).resources/views/logviewer/index.blade.php) for UI changes.storage/logs/laravel.log. Custom paths require controller overrides.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Laravel core update breaks compatibility | Log viewer fails silently. | Fork and test against new Laravel versions. |
| Log files grow too large | UI timeouts or crashes. | Implement log rotation + symlinking. |
| Public route exposed | Log leakage (PII, sensitive data). | Add auth middleware + redaction. |
| No log rotation support | Missed logs post-rotation. | Customize controller to scan all .log files. |
High traffic on /logs |
Server load spikes. | Add rate-limiting or caching. |
/logs and how.How can I help you explore Laravel packages today?