opcodesio/log-viewer
Fast, beautiful log viewer for Laravel. Browse and manage log files, search and filter entries by level, share links, use dark mode, and preview mails. Supports multiple hosts, Horizon logs, and an API for folders, files, and entries.
Observability & Debugging Roadmap:
error/critical logs) via dashboards or alerts integrated with Log Viewer’s API.Use Cases:
tail -f storage/logs/laravel.log with a searchable, filterable, and shareable UI (e.g., filter by exception, auth, or payment keywords).Integration Opportunities:
level=critical).grep, less, or IDE log plugins).debug logs, ops see error logs)./log-viewer).tail -f). Solution: Pair with Laravel Echo or a dedicated tool like Laravel Livewire + custom WebSocket.*"Log Viewer is a 10x productivity boost for our dev/ops teams. Today, debugging issues costs us $X/hour in downtime—this tool cuts that by 70% by replacing manual log parsing with a searchable, filterable UI. For example:
- Reduces MTTR for critical bugs (e.g., payment failures) from 30 mins → 5 mins.
- Enables self-service debugging for junior devs, reducing onboarding time by 2 weeks.
- Supports compliance by letting us export filtered logs for audits without manual work.
- Costs $0 (MIT license) and installs in <1 hour—no new infrastructure needed.
Ask: Should we prioritize this for the next sprint to unlock these savings?"*
*"Log Viewer solves three key pain points for our Laravel stack:
- Unified Log Access: No more juggling
storage/logs/, Horizon, and Nginx files—one UI for all logs.- Supercharged Debugging: Search/filter by keywords, log levels, or timestamps (e.g.,
find all 'Stripe' errors in the last hour).- API-First Design: Build custom integrations (e.g., Slack alerts for critical logs or dashboard metrics) without reinventing the wheel.
Implementation:
- Install:
composer require opcodesio/log-viewer+php artisan log-viewer:publish(5 mins).- Access:
/log-viewerendpoint (authenticated via Laravel’s middleware).- Extend: Custom parsers for proprietary logs or RBAC via middleware.
Trade-offs:
- No real-time streaming (but fast indexed search offsets this).
- Limited RBAC (workaround: wrap routes in
can:view-logsgate).Proposal: Let’s dogfood this in staging for 2 weeks and measure debug time savings. If it reduces P0 incidents by >20%, we should roll it out to production."*
*"Log Viewer reduces alert fatigue by:
- Surface critical errors first: Filter by
level=errororexceptionto triage issues faster.- Correlate logs with Horizon jobs: Click a failed job in Horizon → jump to the exact Laravel log entry.
- Mobile-friendly UI: Debug issues on-call from your phone without SSH.
Operational Notes:
- Permissions: Ensure the web server user (e.g.,
www-data) can read log files (e.g.,/var/log/nginx/).- Performance: Logs are indexed on demand—no upfront processing needed.
- Backup: Use the download feature to archive logs before purging old files.
Ask: Should we restrict access to
/log-viewervia IP whitelisting or 2FA for production?"*
How can I help you explore Laravel packages today?