Weave Code
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

A fast, beautiful Laravel log viewer for browsing and managing logs in storage/logs and beyond. Search and filter entries by level, share links, download/delete files, preview logged mails, support multiple hosts, dark mode, mobile UI, and API access.

View on GitHub
Deep Wiki
Context7

opcodesio/log-viewer adds a fast, polished Log Viewer UI to your Laravel app, making it easy to inspect and understand log files without digging through raw text. Browse logs from storage/logs and other sources, then search, filter, and share specific entries for quicker debugging and collaboration.

  • View Laravel logs plus common server/app logs (Horizon, Nginx/Apache, Redis, Supervisor, Postgres, more)
  • Powerful search and level-based filtering (error, info, debug, etc.)
  • Sharable links to individual log entries
  • Dark mode, mobile-friendly, keyboard-accessible interface
  • Download and delete log files from the UI, with API access for folders/files/entries
Frequently asked questions about Log Viewer
How do I install Log Viewer in Laravel 12 or 13?
Run `composer require opcodesio/log-viewer` and publish the assets with `php artisan log-viewer:publish`. The package integrates seamlessly with Laravel’s service provider and routing, requiring no database migrations or schema changes. Ensure your web server has read access to the `storage/logs` directory.
Does Log Viewer support Laravel Octane?
Yes, Log Viewer is explicitly compatible with Laravel Octane. It leverages Octane’s scoped bindings and handles concurrent requests efficiently. However, test under high traffic to ensure filesystem I/O doesn’t become a bottleneck when querying large log files.
Can I restrict access to the log viewer for specific roles?
Absolutely. Use Laravel’s built-in authentication (e.g., `auth:api` or `can:view-log-viewer`) or integrate with existing guard systems. The package supports middleware, so you can apply role-based access controls via the `log-viewer:middleware` configuration.
What if my logs are stored in a non-standard location (e.g., S3 or a remote server)?
Log Viewer relies on filesystem access by default, but you can extend it by creating a custom log reader. The package’s modular design allows you to override the default log parser to support S3, remote servers, or other storage backends. Check the documentation for the `LogReader` interface.
How does Log Viewer handle large log files (e.g., multi-GB files)?
The package includes an `IndexedLogReader` to optimize performance for large files. However, querying very large logs may still introduce latency. For critical applications, consider pre-indexing logs or caching frequently accessed entries. Benchmark under your expected load.
Can I customize the UI or theme of Log Viewer?
Yes, you can publish and modify the frontend assets using `php artisan log-viewer:publish`. The UI is built with Vue.js, so customization requires familiarity with Vue and the package’s asset structure. Themes and additional filters can be added by extending the published assets.
Does Log Viewer support JSON-formatted logs with nested structures?
Log Viewer handles standard Laravel JSON logs well, but complex nested JSON structures may require a custom log parser. The package supports extensible parsers, so you can create a custom reader to handle non-standard formats. Check the `LogParser` interface for implementation details.
How can I integrate Log Viewer’s API with external monitoring tools like Datadog or Sentry?
Log Viewer provides a RESTful API for accessing log entries, folders, and files. You can extend the API to format logs for Datadog, Sentry, or other tools by creating custom API routes or middleware. The API documentation outlines endpoints for log entries, files, and folders.
What are the system requirements for Log Viewer?
Log Viewer requires PHP 8.1–8.3 (as of Laravel 12/13) and Laravel 8.x–13.x. Ensure your web server user has read access to log directories (e.g., `storage/logs`). For containerized environments, adjust permissions or ACLs to avoid filesystem access issues.
Are there any alternatives to Log Viewer for Laravel?
Alternatives include Laravel Debugbar (for debugging tools), Spatie’s Log Viewer (simpler but less feature-rich), or third-party SaaS solutions like LogDNA or Papertrail. Log Viewer stands out for its native Laravel integration, API access, and support for multiple log types (Horizon, Nginx, etc.).
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport