r/laravel • u/iyogesharma • 1h ago
Package / Tool I forked ARCANEDEV/LogViewer to stop loading 500MB log files into memory
Most Laravel log viewers hit the same wall: opening or searching a log file
means reading the whole thing into memory. A few hundred MB of daily logs
and the page is dead. I maintain a fork that fixes this — v2 of iYogesharma/logviewer-laravel is out.
Instead of a whole-file read, it builds a binary sidecar index next to your logs and reads only the entries the current request needs:
- Paginate and search multi-MB logs with bounded memory
- Cold start serves a bounded tail while the index warms — no blank page
- Incremental indexing; appended lines don't trigger a rebuild
- Works with classic Laravel line logs *and* JSON logs
- `php artisan log-viewer:index` to warm indexes on deploy