Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Log Viewer Laravel Package

rap2hpoutre/laravel-log-viewer

A small log viewer for Laravel 12 and 13. Install via Composer and add a route to LogViewerController to browse logs in your browser. Works with or without log rotation, requires no public assets or vendor routes, and supports custom views and configuration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Decision framing. Treat rap2hpoutre/laravel-log-viewer as a tactical debugging enabler, not a platform bet. It is a mature, single-purpose package (3.1k stars, MIT, active releases through 2026-05-12) with an explicit compatibility contract: Laravel 12 and 13, three-step install, one controller route. The low opportunity score (~43.7) and zero recorded dependents are portfolio signals: minimal strategic upside, minimal downstream blast radius. That combination makes it cheap to trial and cheap to reverse.

Architecture fit.

  • Strong: idiomatic Laravel integration — service provider, route, Blade, config. It is a read-only presentation layer over files the framework's logging channel already writes. No new datastore, queue, sidecar, or outbound network dependency.
  • Strong: no vendor routes and no public assets means the HTTP surface is entirely under your control — exactly what you want for a tool that exposes sensitive data.
  • Strong: channel-agnostic across single-file and daily rotation. v2.0.0 added daily-log support and an explicit exception on unreadable files, partially closing the earlier "silent failure" gap.
  • Weak: local filesystem only. It does not read centralized sinks (CloudWatch, ELK, Loki), does not meaningfully parse structured/JSON logs, and has no alerting, retention, or audit trail. It is a viewer, not observability.
  • Weak (architectural risk): it assumes the app server's disk is the source of truth. On load-balanced or containerized deployments, /logs shows one pod's slice of history — a correctness problem that surfaces as a product problem ("why can't QA see the error the customer reported?").

Integration feasibility. Genuinely low effort: composer require, one route registration, optional vendor:publish for view and config. The real work is governance, not installation. Three gates a TPM should own before approval:

  1. Access-control gate — the route ships with middleware (auth plus a role/ability check or IP allowlist) in the same PR that adds it. An unprotected /logs on a public host is a credential-and-PII exfiltration path and the single most likely way this package generates an incident.
  2. Environment gate — an explicit APP_ENV guard limiting the route to local/staging, unless a named owner accepts production exposure in writing.
  3. Version gate — confirm Laravel 12/13 and PHP 8.x. Teams on 6–11 or Lumen must pin older releases, which are explicitly unmaintained.
  4. Deploy-ordering gate — register the route after auth scaffolding and the Gate exist; shipping the route first yields universal 403s that read as a broken package.

Key questions for the engineering owner.

  • Are we single-instance or horizontally scaled? If scaled, is a local-disk log viewer actually useful, or does it manufacture confusion?
  • What is the p95 laravel.log size in staging/prod? The controller reads and parses the whole file with no pagination — logs routinely over ~50MB will stall requests and pressure memory.
  • Does our logging configuration capture tokens, PII, or request bodies? Enabling the viewer converts log files into a web-readable surface; redaction must happen at the logging layer.
  • Who is the named owner of the production route, if any, and what is the review date?
  • Do we already run php artisan pail, tail, or a managed aggregator? If so, this is a complement for historical/non-engineer access, not a replacement.

Integration Approach

Stack fit. Native to the Laravel monolith. It requires no infrastructure change, no new secrets, no runtime service dependency, and no CI modification beyond the composer lock update. Fit degrades to "poor" only where the organization has standardized on a centralized log aggregator or runs ephemeral containers — in those cases the viewer contradicts the platform's source-of-truth model.

Compatibility.

  • Supported: Laravel 12 and 13, PHP 8.x, single-file logs, daily rotation.
  • Out of scope: compressed rotated files (.gz will not open), Lumen, and Laravel ≤11 (older releases only, unmaintained).
  • Known friction: stale config cache produces InvalidArgumentException in FileViewFinder.php; PHP-FPM user lacking read access on storage/logs/ produces an empty or erroring view rather than a clear permission message.

Migration path. Greenfield — nothing to migrate. There is no data model, no schema, no state. Removal is composer remove plus deleting one route line; the only residue is a published view/config, which is inert without the route. This near-zero reverse cost is the core argument for approving a bounded trial.

Sequencing (recommended order):

  1. Staging only. composer require in the staging branch; register the route behind auth + a can:viewLogs Gate + throttle:30,1.
  2. Wrap in an environment guard (app()->environment(['local','staging'])) so production is excluded by construction, not by convention.
  3. Constrain any file parameter with a where('file', '[A-Za-z0-9_\-.]+') rule if deep-linking to specific files — this is the path-traversal control.
  4. Publish the config and set log paths/patterns plus a conservative max-size limit; confirm multi-channel setups (billing, queues) appear in the file picker via config, not code changes.
  5. Publish the Blade view only if client-side search, issue-tracker links, or redaction banners are required — the view is the supported extension point; the controller is not.
  6. Instrument the outcome. Run a two-to-four week trial with QA/support as the intended users, then decide on keeping, extending, or retiring. Default to retiring from anything resembling production.

Extension discipline. Do not fork or subclass the vendor controller. Publish the view and build filtering/highlighting client-side; if server-side filtering or export is genuinely needed, that is the signal to move to a real aggregator rather than grow this package.

Operational Impact

Maintenance. Very low but non-zero. MIT license, a single maintainer, one narrow responsibility, and a real release history (v1.0.0 → v2.0.0 → releases into 2026). Bus factor is 1, which is acceptable precisely because the blast radius is one route and the removal cost is minutes. Budget for periodic Laravel-major compatibility checks; do not budget for feature development.

Support. Support burden lands on whoever owns the route, not the vendor. Expect recurring tickets of four kinds: "logs page is blank" (permissions or config cache), "logs page is slow/timed out" (large file, no pagination), "I can't find X" (no server-side search), and "this isn't what production looks like" (multi-instance). Publish a one-page runbook covering php artisan config:clear, the sudo -u www-data test -r check, and the rotation policy. Also publish an explicit statement that this is not an incident-response tool.

Scaling. The weakest dimension. Three independent ceilings:

  • File size — whole-file read and parse per request; degrades sharply past tens of MB. Mitigate with the daily channel plus days => 7 and a configured max size, not with code changes.
  • Instance count — one request sees one host's files. Behind a load balancer the view is non-deterministic per refresh.
  • Concurrency — each view consumes PHP-FPM worker memory and time proportional to file size; on a shared pool a large log view can starve real traffic. The throttle middleware is a mitigating control, not a fix.

Failure modes and controls.

Failure mode Symptom Product-level control
Route deployed without middleware Public /logs, log contents indexed or scraped Access-control gate in the same PR; environment guard; post-deploy smoke check
Secrets/PII in log lines Credentials or customer data readable over HTTP Redaction at the logging layer; audit Log::info/debug payloads before enabling
Stale config cache FileViewFinder exception on first visit Runbook step: config:clear; include in deploy checklist
Permissions on storage/logs/ Empty or erroring view, no clear cause Pre-flight read check as the web user
Oversized log file Slow page, worker exhaustion Max-size config, aggressive rotation, staging-only exposure
Path traversal via file param Arbitrary file read Constrain the route parameter; never expose unbounded file selection
Multi-instance drift QA cannot reproduce what a customer saw Document the limitation; do not position as production triage

Ramp-up. Effectively zero for a Laravel developer: the README is three lines and the controller is small enough to read in one sitting. Budget half a day for the first engineer to install, secure, and document it; under an hour for subsequent environments. The real onboarding cost is organizational — teaching QA and support what the tool does and does not show, and getting the security review of the access-control and environment gates done once, properly, rather than per-team.

Recommendation. Approve a time-boxed, staging-scoped trial with the access-control and environment gates as hard preconditions. Success criteria are qualitative and modest: fewer SSH sessions for routine log checks, and non-engineers able to read logs unaided. Do not approve production exposure, do not fund extensions beyond the published view, and re-evaluate against your log-aggregator roadmap at the end of the trial — if that roadmap lands, retire this package rather than maintain both.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource