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

Log Viewer Laravel Package

opcodesio/log-viewer

Log Viewer is a fast, beautiful companion for Laravel apps that lets you browse, search, filter, and share logs from storage/logs and other sources. Includes dark mode, mobile-friendly UI, API access, mail previews, and log file download/delete.

View on GitHub
Deep Wiki
Context7

Log Viewer is a free, easy-to-install companion for Laravel applications that replaces reading raw log files with a fast, searchable web UI. It reads all logs in storage/logs and other types of logs — Horizon, Apache, Nginx, Redis, Supervisor, Postgres, and more — letting you quickly inspect individual entries, filter by log level, and share links to specific entries.

  • Search & filter logs by level (error, info, debug) with sharable entry links
  • Multi-host support with dark mode and a mobile-friendly, keyboard-accessible UI
  • Manage files — download or delete logs directly from the interface
  • API access for folders, files, and log entries
  • Mail previews for emails sent to the logs
Frequently asked questions about Log Viewer
How do I install opcodesio/log-viewer in a Laravel app?
Install it with composer require opcodesio/log-viewer. The service provider is auto-discovered, so the UI is available at your app URL plus /log-viewer without further wiring. Since v3.22.0 assets are served directly from the vendor directory, so there is no publish step and no asset build to forget during deployment. Publishing the config file is optional and only needed if you want to change paths, middleware, or other defaults.
How do I secure the Log Viewer route in production?
Log Viewer ships with an authorization gate you must define, typically a viewLogViewer gate that restricts access to admins or the same policy used by your admin surface. Never leave the route open in production, because log lines routinely contain bearer tokens, session IDs, SQL with PII, and password reset links. Add a feature test asserting a non-admin user receives a 403 so the gate cannot silently regress. Many teams also register the package only in local and staging environments and skip production entirely.
Which Laravel and PHP versions does log-viewer support?
The support matrix is broad: PHP 8.0 and newer against Laravel 8.x through 13.x, with PHP 8.5 deprecation fixes landing in v3.22.0. Laravel 13 support and scoped bindings for Octane arrived in v3.24.0. Check your exact PHP and Laravel combination against the current release before upgrading the framework.
Can Log Viewer read Nginx, Apache, Redis, Supervisor, or Horizon logs?
Yes. Beyond storage/logs, you can register additional log paths in the config file for Apache, Nginx, Redis, Supervisor, Postgres, and Horizon logs. Each path is exposed as a separate folder in the UI and API, so you can search across infrastructure logs without SSH access. Note that Horizon support is currently cited only up to Horizon v9.20, which can block teams on newer versions.
Does opcodesio/log-viewer work with Laravel Octane?
Yes, from v3.24.0 onward the package registers scoped bindings so state does not leak between requests in long-lived workers. That matters because singleton-based packages are a common source of subtle bugs under Octane. If you run Octane, pin to v3.24.0 or later and re-test the UI after any major upgrade.
Does Log Viewer need a database, migrations, or queue workers?
No. Log Viewer is a read-only UI and JSON API over log files on the host filesystem, with no schema, migrations, or background jobs. The only real requirement is that the PHP web process can read the configured log paths. Widening filesystem permissions to satisfy that has a blast radius beyond the package, so scope ACLs narrowly.
How do I search and filter Laravel logs with Log Viewer?
Open the UI and use the search box to query log entries, then narrow results with the log level filter for error, warning, info, or debug. Individual entries get a shareable link you can paste into a ticket or chat with a teammate. The interface is keyboard accessible, mobile friendly, and includes a dark mode, and you can download or delete log files directly from the UI.
Is there an API for log folders, files, and entries?
Yes. Log Viewer exposes JSON API endpoints for listing folders and files and for fetching individual log entries, which is useful for scripting or building internal dashboards. The API sits behind the same authorization gate and route prefix as the UI, so protect it identically. Treat the endpoints as internal tooling rather than a public integration surface.
Does Log Viewer support custom or non-standard log formats?
Default Laravel, Horizon, and common infrastructure formats work out of the box, but bespoke formats require writing a custom parser. Teams assuming it just works on unusual middleware logs will hit friction on day one. Validate one real sample file from each custom channel before rolling the package out widely.
Is opcodesio/log-viewer maintained, and does it replace Datadog or Sentry?
The package has roughly 4.4k stars and healthy release velocity, but development is concentrated in one main author, so the bus factor is one. Mitigate with version pinning and a documented fallback such as tail -f or your central log platform. It is a diagnosis accelerator layered on top of aggregation and alerting, not a system of record, so do not let it become a second half-owned logging story.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo