- Does graham-campbell/logviewer work with Laravel 9, 10 or 11?
- No. The package targets Laravel 5 and is unmaintained, so assume it is incompatible with Laravel 9 and later until you prove otherwise in a real test. The fastest way to settle it is a five-minute composer require in a throwaway container pinned to your target PHP and framework versions. For Laravel 8+ applications use a maintained alternative such as opcodesio/log-viewer or Laravel Telescope instead.
- How do I install LogViewer in a Laravel application?
- Require the package with Composer and let Laravel's package auto-discovery register its service provider, so no manual provider entry is needed. Optionally publish the configuration file so you can customise the route, the middleware stack and the log file location for your project. Once installed, open the configured route in your browser to view recent entries.
- How do I configure the LogViewer route, middleware and log file path?
- Publish the package config and you get three practical knobs: the route the viewer is exposed on, the middleware applied to that route, and the path of the log file it reads. Point the log path at your default storage/logs location, or at a specific dated file if you use daily channels. Keep the route name obscure only as a nicety, never as a substitute for real access control.
- How do I secure the LogViewer route in production?
- The package ships no authentication, RBAC, access audit or redaction of its own, so protection depends entirely on the middleware you attach. Put it behind your existing auth and role middleware, add an IP allowlist or VPN restriction, and prefer non-production or break-glass production use. Treat the route as a direct path to stack traces, credentials in exception messages and PII in request payloads, and do a proper security review before exposing it.
- Does LogViewer support daily log files as well as a single laravel.log?
- Yes. It reads Laravel's default file-based log channels, which covers both the single file and daily file setups, and the log file location is configurable. It only reads from local disk, so it does not cover channels that ship logs elsewhere, such as stderr, syslog, CloudWatch or Datadog.
- Can I use LogViewer on a containerised or multi-node deployment?
- Not usefully. Each request reads whichever log file happens to sit on the local disk of the instance serving that request, so with ephemeral containers, autoscaling or multiple nodes you get a partial and inconsistent view at best. For those environments the correct answer is shipping logs off-host to a central logging stack rather than running an in-app viewer.
- What are the alternatives to graham-campbell/logviewer?
- For Laravel 8 and newer, opcodesio/log-viewer delivers the same in-browser pattern with active maintenance. Laravel Telescope gives richer diagnostics including requests, queries and exceptions, while php artisan pail suits CLI-first teams who are comfortable on a terminal. For multi-node or regulated environments, a centralised logging platform is the real answer.
- Is graham-campbell/logviewer still maintained?
- No. It is best treated as a legacy artifact with no upstream security-patch path, so any CVE or framework incompatibility becomes your fork to own. If you adopt it, name an owner for that fork before you commit. It is internal tooling convenience, not an observability capability, and should be scoped and tracked as such.
- Can I delete, clear or download log files with LogViewer?
- No. The interface is read-only: you open the configured log file and review recent entries in the browser. It does not rotate, truncate or delete logs, and it does not ship them anywhere, so retention stays with Laravel's daily channel settings or your own tooling.
- How should I test LogViewer before rolling it out to staging?
- Stand up a throwaway container pinned to your exact PHP and Laravel 5.x versions, require the package, publish the config and hit the route with your production middleware stack attached. Verify the route resolves, that anonymous requests are rejected, and that log content containing HTML or script payloads renders safely in the view. Budget one to two days on top of the install for that security review.