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

Fast, beautiful log viewer for Laravel. Browse and manage log files, search and filter entries by level, share links, use dark mode, and preview mails. Supports multiple hosts, Horizon logs, and an API for folders, files, and entries.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel-Native Integration: The package is purpose-built for Laravel (8.x–13.x), leveraging Laravel’s service providers, middleware, and routing systems. It integrates seamlessly with Laravel’s logging infrastructure (e.g., Monolog) and extends functionality without requiring architectural overhauls.
  • Modular Design: The package follows Laravel’s conventions (e.g., service providers, config files, Blade/Vue.js frontend) and can be isolated to a single module. This minimizes coupling with core application logic.
  • API-First Approach: The inclusion of a RESTful API for log access (folders, files, entries) enables programmatic log analysis, which aligns with modern Laravel applications requiring headless or microservice-friendly observability.
  • Extensibility: Supports custom log parsers, Horizon logs, and third-party log formats (e.g., PostgreSQL, Redis), making it adaptable to non-standard logging setups.

Integration Feasibility

  • Low Friction: Installation is straightforward (composer require, php artisan log-viewer:publish), with minimal configuration required for basic use. The package auto-detects Laravel logs (storage/logs/*) and supports additional log types (e.g., Nginx, Apache) via configuration.
  • Frontend Agnostic: Uses Vue.js for the UI but serves assets directly from the vendor directory (post-v3.17.0), reducing build complexity. No need for custom frontend tooling unless extending the UI.
  • Authentication: Integrates with Laravel’s auth (e.g., middleware like auth:api or auth:web) via config. Supports role-based access control (RBAC) for sensitive log data.
  • Octane Compatibility: Explicit support for Laravel Octane (via scoped bindings in v3.24.0), ensuring compatibility with high-performance Laravel deployments.

Technical Risk

  • Log File Permissions: Requires the web server user (e.g., www-data, nginx) to have read access to log files (e.g., /var/log/nginx/, storage/logs/). Misconfigurations may lead to "Logs not loading" errors (see Troubleshooting).
  • Custom Log Formats: Non-standard log formats (e.g., JSON, custom delimiters) may require manual parser configuration, adding development overhead.
  • Performance at Scale:
    • Log indexing (via IndexedLogReader) improves query speed but consumes memory for large log volumes. The package includes a rebuild command to evict stale indexes (v3.24.2).
    • API endpoints (e.g., /api/logs) may become bottlenecks under high concurrent access. Caching (e.g., Redis) or rate-limiting should be considered for production.
  • Asset Management: While assets are served from the vendor directory by default, customizing the frontend (e.g., themes, plugins) may require republishing assets or overriding vendor files.
  • Deprecation Risks: PHP 8.5+ compatibility fixes (e.g., avoiding null as array key in v3.22.0) suggest ongoing maintenance, but no breaking changes are expected for Laravel 13.x.

Key Questions

  1. Access Control:
    • How will log access be restricted (e.g., by user role, IP, or log level)? Will custom middleware be needed?
    • For multi-tenant apps, how will log isolation be enforced (e.g., per-tenant log directories)?
  2. Performance:
    • What is the expected log volume (e.g., MB/day)? Will the default indexing approach suffice, or is a custom solution (e.g., Elasticsearch) needed?
    • Are there plans to integrate with Laravel Horizon or other queue workers for log streaming?
  3. Customization:
    • Will the UI need theming or additional features (e.g., log annotations, alerts)? If so, how will this be implemented (e.g., Vue plugins, API extensions)?
    • Are there non-Laravel logs (e.g., Docker, Kubernetes) that require custom parsers?
  4. Deployment:
    • How will log file permissions be managed across environments (e.g., CI/CD, serverless)?
    • Will the package be deployed in a microservice architecture? If so, how will log aggregation (e.g., across services) be handled?
  5. Monitoring:
    • Are there plans to monitor Log Viewer’s performance (e.g., API latency, index rebuilds)?
    • How will errors (e.g., failed log parsing) be surfaced to developers?

Integration Approach

Stack Fit

  • Laravel Ecosystem: Perfect fit for Laravel applications, especially those using Monolog for logging. Complements tools like:
    • Horizon: Native support for Horizon logs (up to v9.20).
    • Octane: Explicit compatibility via scoped bindings.
    • Scout/Meilisearch: Log Viewer’s API can feed into search backends for advanced querying.
  • PHP Version: Requires PHP 8.0+, aligning with Laravel’s minimum version (8.0+). No conflicts with modern PHP features (e.g., attributes, enums).
  • Frontend: Vue.js-based UI with Tailwind CSS. Integrates with Laravel Mix/Vite for asset compilation if customizing the frontend.
  • Database: No persistent storage required (logs are read from filesystem/API). Lightweight in-memory indexing for performance.

Migration Path

  1. Pilot Phase:
    • Install in a staging environment: composer require opcodesio/log-viewer.
    • Publish assets: php artisan log-viewer:publish.
    • Test access at {APP_URL}/log-viewer with default Laravel logs.
  2. Configuration:
    • Update config/log-viewer.php to:
      • Restrict access (e.g., middleware: ['auth:admin']).
      • Add custom log sources (e.g., log_types: ['nginx', 'postgres']).
      • Configure API authentication (e.g., api_token: env('LOG_VIEWER_API_TOKEN')).
  3. Customization:
    • Extend the API for programmatic access (e.g., GET /api/logs?level=error).
    • Override Vue components (e.g., resources/js/log-viewer/) for UI changes.
    • Implement custom log parsers for unsupported formats (e.g., JSON logs).
  4. Production Rollout:
    • Deploy with monitoring for:
      • Log file permission issues.
      • API latency under load.
      • Index rebuild performance.
    • Document the /log-viewer endpoint for DevOps/SRE teams.

Compatibility

  • Laravel Versions: Officially supports 8.x–13.x. Tested with Laravel 13 in v3.24.0.
  • Log Formats: Supports:
    • Laravel’s default Monolog format.
    • Horizon, Nginx, Apache, Redis, PostgreSQL, and custom formats (via parsers).
  • Authentication: Works with Laravel’s built-in auth (e.g., Sanctum, Passport) or custom middleware.
  • Octane: Compatible via scoped bindings (v3.24.0).
  • Third-Party: No hard dependencies on non-Laravel packages (e.g., no Elasticsearch required).

Sequencing

  1. Phase 1: Core Integration (1–2 days):
    • Install and configure basic log viewing.
    • Verify access control and permissions.
  2. Phase 2: Customization (3–5 days):
    • Add custom log sources/parsers.
    • Extend API or UI as needed.
  3. Phase 3: Optimization (Ongoing):
    • Monitor performance (e.g., index rebuilds, API response times).
    • Implement caching or rate-limiting if needed.
  4. Phase 4: Documentation (1 day):
    • Update internal runbooks for log access procedures.
    • Train teams on using the tool (e.g., filtering, sharing links).

Operational Impact

Maintenance

  • Package Updates: Regular updates from the maintainer (last release: 2026-06-11). Follow Laravel’s release cycle for compatibility.
  • Configuration Drift: Minimal risk if using the default config. Custom parsers or middleware may require updates during Laravel major versions.
  • Dependency Management:
    • Frontend dependencies (e.g., Vue, Axios) are managed via the package.
    • Backend dependencies (e.g., PHP libraries) are isolated to the package’s composer.json.
  • Backup/Recovery: No persistent data to back up (logs are read-only). Failures are non-destructive (e.g., missing logs gracefully handled).

Support

  • Troubleshooting:
    • Common issues (e.g., permission errors, missing logs) are documented here.
    • Custom log formats require manual parser configuration (see Log Types).
  • Vendor Support: Community-driven (GitHub issues, Discord). No official SLA, but high activity (4.3k stars, 500+ contributors).
  • Internal Support:
    • Assign a team
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.
monarobase/country-list
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity