dipeshshihora/laravel-log-viewer
Simple log viewer for Laravel 9–12 and Lumen. Install via Composer, add a /logs route to LogViewerController, and browse storage logs with a plain HTML UI. Optional publishing for views/config; supports patterns, multiple paths, paging, and max file size limits.
log_max_files or external log shippers like syslog-ng/Filebeat).log config.auth, can:view-logs) for RBAC.log:stack in Laravel).| Risk | Likelihood | Mitigation |
|---|---|---|
| Performance Impact | Medium | Log file parsing could slow responses if logs are large. Mitigate: Add pagination, lazy-loading, or stream logs via SplFileObject. |
| Security Gaps | High | No built-in auth; logs may expose sensitive data (tokens, PII). Mitigate: Enforce middleware, sanitize log output, or use Laravel’s log-level filtering. |
| Maintenance Burden | Low | MIT license + simple codebase. Risk: Abandonware (1 star, no recent activity). Mitigate: Fork or wrap in a feature flag for quick swaps. |
| Compatibility | Low | Laravel 10+ only; may break with future Monolog updates. Mitigate: Test against Laravel’s minor version upgrades. |
Why not use existing tools?
Log Volume & Retention:
logrotate, AWS S3)?Security Requirements:
Long-Term Strategy:
tail -f, laravel-logger, or SIEM tools)?syslog + Fluentd).storage/logs/laravel.log).dipeshshihora/laravel-log-viewer).php artisan vendor:publish --tag=log-viewer-views
/logs with auth middleware).config/logging.php if using non-default paths.LogViewerServiceProvider).debug logs in production).composer.json).| Phase | Tasks | Dependencies |
|---|---|---|
| Pre-Integration | Audit logs, define security rules, set up test environment. | Dev/staging environment ready. |
| Core Integration | Install package, publish views, route logs, test UI. | Laravel app running, Composer access. |
| Security Hardening | Add auth middleware, redact sensitive data, restrict IP access (if needed). | Basic integration working. |
| Performance Tuning | Implement pagination, lazy-loading, or caching for frequent users. | High-traffic logs identified. |
| Monitoring | Log viewer’s own errors (e.g., file access issues). | Sentry/Monolog configured. |
composer.json or fork.logrotate).storage/logs/laravel.log).chmod -R 755 storage/logs.log:stack to aggregate logs centrally (e.g., Redis, database).Filebeat → Elasticsearch).LogViewerServiceProvider.Redis) if users frequently revisit searches.How can I help you explore Laravel packages today?