Open-source project
opcodesio/log-viewer avatar
opcodesio/log-viewer

What Log Viewer does to a Laravel storage/logs directory

Fast and beautiful Log Viewer for Laravel

4,446 stars323 forksPHPMIT

At a glance

What is it?
OPcodes Log Viewer turns a Laravel application directory of raw log files into a searchable, filterable browser UI served from the app itself, and it costs two commands to put there. The interesting parts are the parser contract and the permission boundary, not the interface.
Who is it for?
Adopt it if your team already runs Laravel and wants a shared, browser-based view of log files without sending them to a third party service, and if someone on the team is willing to own a custom parser for any non-standard format. Do not adopt it as a retention system, as an alerting layer, or as a stand-in for Horizon on a version past v9.20.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 157 days ago.
What is it written in?
Mainly PHP, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • opcodesio/log-viewer4,446 ★ · +1
Star history
Repository2026-09-232026-11-15
opcodesio/log-viewer4.4k4.4k

1 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Reading a folder of files instead of tailing one stream

A Laravel application writes to `storage/logs`, and those files accumulate until someone deletes them by hand. Log Viewer takes that directory as its input and presents each file as a list of individual entries you can page through, so a stack trace is one click away rather than the result of a recursive grep in a terminal.

The audience is a Laravel team that has more than one person who needs to read those entries. One developer on a laptop can live with tailing a file in a terminal. A support group debugging a staging incident at 2am cannot share a terminal scrollback, and Log Viewer's sharable per-entry links exist for exactly that handoff.

Beyond the Laravel daily log, the file types named in the feature list include Horizon, Apache, Nginx, Redis, Supervisor and Postgres logs. That breadth is the package's main argument: the same parser pipeline is pointed at several vendor formats rather than only at Monolog output. The feature list also names multiple host support.

Nothing here is a log aggregation pipeline. There is no shipper, no retention policy, no alerting. The package reads files where they already sit.

Two commands, then a route under your own application URL

Requirements are PHP 8.0 or newer and Laravel 8 or newer. Install it as an ordinary Composer dependency.

bash
composer require opcodesio/log-viewer

That registers the service provider and the routes but does not copy the front-end build. The published assets are what the browser actually loads, so the second command is not optional.

bash
php artisan log-viewer:publish

After both steps, the panel sits at `{APP_URL}/log-viewer`, for example `https://my-app.test/log-viewer`. There is no separate daemon, no container and no separate database. Because the route lives inside your application, it runs on your web process, and that process's read permissions decide whether it can show your logs.

Configuration beyond the defaults lives on the docs site rather than in the repository README. If you need to change which folders are scanned, that is a documentation trip.

A Vue 3 SPA built by laravel-mix, carrying a Vue 2 template compiler

The repository layout shows a conventional Laravel package: `src/` for PHP, `resources/` and `public/` for the front end, `routes/` for the panel routes, `config/` for the shipped configuration. The dependency list in `package.json` places Vue, Vue Router, Pinia and Tailwind behind laravel-mix and webpack 5, with `mix-manifest.json` and `webpack.mix.js` at the root.

One detail there is worth a second look. The dev dependency list pins vue to ^3.5.37 and vue-router to ^4.6.4, yet it also carries vue-template-compiler at ^2.7.14, which belongs to the Vue 2 line. Skimming the file you read it as a stale entry. Such a mismatch only matters to you if you fork the package and rebuild the front end, which is a reason to treat the already published assets as the supported path rather than running a local build.

The build scripts expose `dev`, `watch`, `watch-poll`, `hot`, `prod` and `production`. None of them are needed to consume the package, since `log-viewer:publish` copies what has already been built.

Horizon support stops at v9.20, and unknown formats need your own parser

Horizon is the first place the feature list draws a line. Log Viewer states Horizon support up to v9.20, so a team on a newer Horizon is outside the stated range.

The second line is the parser contract. If your log has a custom format, or a format not supported out of the box, you have to define your own custom log parser, which is a piece of PHP you own and maintain. The troubleshooting section for logs not loading sends you first to the supported-format page and then to the custom parser docs.

The same applies to Laravel's own log format if your application has changed it. Anything that writes free text into a file under a scanned directory has to match what a parser expects. A stale index is the quiet version of this failure: the entries exist on disk but the panel shows nothing, which reads as missing logs rather than as a bug.

The web process needs read access to every folder you point it at

The troubleshooting section names the second cause of an empty panel directly: if logs are still not showing up, the web process that Log Viewer runs on must have permission to read them.

The worked example is the HTTP access log directory `/var/log/httpd`. Fixing it means granting the httpd process read access to those files, which on unix systems the docs point at file ACLs rather than a blanket permission change on the directory. That is the correct instinct. A panel that can browse `/var/log/httpd` on a shared host is also a panel that can browse anything else the web user can read.

The README does not describe how access to the panel is controlled, and the panel includes download and delete controls for log files, so check who can reach the `/log-viewer` route.

The delete button removes the file your application is still writing to

Two controls in the panel operate on the real files rather than on a copy: download, and delete. On a normal Laravel box the application process has the only open handle it needs, so removing a rotated daily log is harmless. On a host where several services share a log directory, including the web server, Redis or Supervisor logs the panel can also read, a delete from the browser removes a file another process is appending to and may still need.

The feature list pairs these controls with dark mode, a mobile-friendly layout and keyboard accessibility, none of which change what is stored on disk. Those are reasons the panel is usable on a phone. Deleting a log is a decision about evidence, not about the interface.

Search and filtering by level work the same way: they read the indexed entries of files currently on disk, so anything already deleted is gone from every view the panel offers, including the sharable entry links.

Where this differs from a terminal pager and a shipped log pipeline

The obvious comparison is the terminal. Tailing a file streams it as it is written, and paging backwards with a pager needs no install and no web process. What they cannot do is give a colleague a link to one stack trace, filter thousands of files by level, or open a Postgres log sitting in a different directory on another host. Log Viewer's gain is shared, browser-based access to a folder, and its cost is a PHP dependency, published assets and a permission boundary.

The other difference is direction. Shipped log pipelines, where a file leaves the host and lands in a queryable service, keep history after someone deletes the source file. Log Viewer reads what is on disk now. Download and delete act on real files, so retention decisions are yours to make in the filesystem.

There is an API for folders, files and log entries, which is the hook for scripting against the same data, but it is the same read of the same files rather than a second, better source.

Editorial conclusion

Adopt it if your team already runs Laravel and wants a shared, browser-based view of log files without sending them to a third party service, and if someone on the team is willing to own a custom parser for any non-standard format. Do not adopt it as a retention system, as an alerting layer, or as a stand-in for Horizon on a version past v9.20. Before anything else, confirm the web process can read the directory you care about, because missing read permission is one of the two causes the troubleshooting section gives for logs not showing up, and check whether your authentication middleware already guards the /log-viewer route.

Frequently asked questions

How do I install Log Viewer for Laravel?

Run `composer require opcodesio/log-viewer` and then `php artisan log-viewer:publish` to copy the front-end assets. Afterwards the panel is served at `{APP_URL}/log-viewer`. PHP 8.0+ and Laravel 8+ are required.

Why are my Laravel logs not showing up in Log Viewer?

Either the format is not supported out of the box, in which case you need to define your own custom log parser, or the web process has no read permission on the log files. Check the supported formats page and the process permissions.

Which Horizon versions does Log Viewer support?

Horizon log support is stated up to Horizon v9.20. A Horizon version beyond that is outside the range the package claims to cover.

What log formats can Log Viewer read besides the Laravel log?

The feature list names Horizon, Apache, Nginx, Redis, Supervisor and Postgres among others. Custom formats outside the supported set need a parser you define yourself.

Does Log Viewer have an API for scripting against log data?

Yes. API access is listed for folders, files and log entries, so an external script can read the same files the panel reads rather than parsing them separately.

Official sources

  1. License: MIT
  2. opcodesio/log-viewer on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/opcodesio-log-viewer.svg)](https://hysenlabs.com/projects/opcodesio-log-viewer)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/opcodesio-log-viewer.svg)](https://hysenlabs.com/projects/opcodesio-log-viewer)

Was this useful?