- How do I install LaravelGoodLogViewer in my Laravel 5 project?
- Run `composer require golovchanskiy/laravel-good-log-viewer`, then add the service provider and facade alias to `config/app.php`. Finally, publish assets with `php artisan good-log-viewer:publish`. Access logs at `/logs` after setup.
- Does LaravelGoodLogViewer work with Laravel 6, 7, or 8+?
- No, this package is **Laravel 5.x only**. For newer Laravel versions, consider alternatives like Spatie’s Log Viewer or Laravel Debugbar, which support modern Laravel releases.
- Can I secure the `/logs` endpoint to prevent unauthorized access?
- Yes, manually protect the route with middleware like `auth:api` or `throttle`. Example: `Route::get('/logs', function () { return GoodLogViewer::show(); })->middleware(['auth:api', 'throttle:60,1']);`. Never expose logs publicly in production.
- What languages does LaravelGoodLogViewer support?
- It includes built-in support for **English (en)** and **Russian (ru)**. For other languages, you’d need to manually extend the translations or fork the package.
- Will this package slow down my application if logs are large (e.g., >100MB)?
- Log parsing happens on-demand, but large log files may cause performance issues. For production, consider archiving logs or using a dedicated logging service like Papertrail or Sentry instead.
- Can I customize the log viewer’s UI or add filters (e.g., by log level or date)?
- The UI is Blade-based, so you can override templates by publishing and modifying them. Basic filtering (e.g., by level) is supported, but advanced features like real-time streaming or structured log analysis require custom extensions.
- Does LaravelGoodLogViewer work with custom Monolog handlers (e.g., Slack, Syslog)?
- It integrates with Laravel’s default Monolog setup but may need adjustments for custom handlers. Test thoroughly if you use non-standard log destinations.
- Is there a way to integrate this with existing monitoring tools (e.g., alerts, dashboards)?
- This package is designed for **local/dev debugging**, not production monitoring. For alerts/dashboards, pair it with tools like Sentry, Datadog, or Laravel’s built-in notifications.
- How do I test if LaravelGoodLogViewer is parsing logs correctly?
- Manually trigger logs (e.g., `Log::error('Test')`), then verify they appear in `/logs`. Test edge cases like empty logs or malformed entries by simulating them in your test environment.
- Are there any known security risks with exposing `/logs` in production?
- Yes—logs may contain sensitive data (e.g., passwords, tokens). Always restrict access via middleware (e.g., `auth:api` + IP whitelisting) and avoid using this in production for observability.