rap2hpoutre/laravel-log-viewer
Lightweight Laravel log viewer for Laravel 12/13. Install via Composer and add a single route to LogViewerController to browse app logs in the browser. No public assets or vendor routes; works with or without log rotation. View and config are publishable.
vendor:publish for customization.storage/logs/laravel.log).auth, admin) and restrict to non-production environments.storage/logs/ permissions). Mitigation: Document and enforce permission requirements (e.g., chmod -R 755 storage/logs/).php artisan config:clear in installation docs and CI/CD pipelines..gz) or rotated files beyond Laravel’s daily channel. Mitigation: Disable log compression or pre-process logs for compatibility.laravel-debugbar.Security and Compliance:
Environment Scope:
Customization Needs:
Performance:
Alternatives:
spatie/laravel-logging) for comparison?Operational Impact:
Pre-Integration Assessment:
Pilot Installation:
composer require rap2hpoutre/laravel-log-viewer
config/app.php:
Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,
routes/web.php (with middleware for security):
Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index'])
->middleware(['auth', 'verified']); // Example: Restrict to authenticated users
storage/logs/laravel.log).Customization (If Needed):
php artisan vendor:publish --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" --tag=views
php artisan vendor:publish --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider"
resources/views/vendor/laravel-log-viewer/log.blade.php for UI changes.config/logviewer.php for non-standard log paths or behavior.LogViewerController for additional features (e.g., date filtering, export).Security Hardening:
auth, admin, or custom roles).public function handle($request, Closure $next) {
if (app()->environment('production')) {
abort(403, 'Log access disabled in production.');
}
return $next($request);
}
Log::withoutOverwriting or custom log channels).logrotate for large files).Documentation and Training:
/logs publicly").Monitoring and Feedback:
How can I help you explore Laravel packages today?