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

Laravel Log Viewer Laravel Package

rap2hpoutre/laravel-log-viewer

Lightweight Laravel log viewer for Laravel 12/13. Install via Composer and add a single route to LogViewerController to browse app logs in the browser. No public assets or vendor routes; works with or without log rotation. View and config are publishable.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging Efficiency: Provides a self-service log viewer for Laravel, reducing dependency on DevOps/engineering for log inspection. Ideal for development and staging environments where quick access to logs accelerates issue resolution.
  • Build vs. Buy: Eliminates the need to build a custom log viewer (saving 1–2 weeks of dev time) and avoids long-term maintenance of a bespoke solution. Leverages Laravel’s ecosystem with minimal overhead.
  • Security and Access Control: Enables role-based access via middleware (e.g., auth, admin), addressing compliance needs without requiring a full observability stack. Can be extended with IP whitelisting or 2FA for sensitive environments.
  • Roadmap Flexibility: Supports Laravel 12/13 (and older versions via releases), ensuring compatibility with future upgrades. Customizable via Blade templates and config files to adapt to evolving UI/UX or logging requirements.
  • Cost Optimization: Zero licensing fees (MIT license) and minimal setup reduce operational costs compared to enterprise tools (e.g., Datadog, ELK). No infrastructure dependencies beyond Laravel’s existing logging system.
  • Developer Experience: Integrates seamlessly with Laravel’s service provider and routing systems, requiring only 3 steps to implement. Reduces context-switching between CLI (tail -f) and browser-based debugging.
  • Compliance Alignment: Supports log retention policies by working with Laravel’s default log rotation (daily files). Can be paired with log masking tools (e.g., laravel-masking) to address PII/GDPR requirements.

When to Consider This Package

Adopt When:

  • Your team uses Laravel 12/13 (or older versions via legacy releases) and needs a quick, lightweight log viewer for development/staging.
  • Logs are stored locally (e.g., storage/logs/laravel.log) and uncompressed (no .gz or .zip files).
  • You prioritize speed of implementation over advanced features (e.g., log aggregation, alerting, or analytics).
  • Security can be managed via middleware (e.g., restricting access to authenticated/admin users).
  • Your roadmap does not include a full observability platform (e.g., Datadog, ELK, CloudWatch).
  • You want to reduce MTTR (Mean Time to Resolution) for bugs by enabling browser-based log inspection.

Look Elsewhere When:

  • You need production-grade log access with built-in authentication/authorization (e.g., SSO, RBAC, audit trails).
  • Logs are distributed across multiple servers (consider ELK, Fluentd, or AWS CloudWatch).
  • You require log analytics, parsing, or alerting (e.g., error rate monitoring, anomaly detection, or SLI/SLO tracking).
  • Your environment uses compressed logs (.gz, .zip) or non-standard log paths (e.g., custom log channels).
  • Compliance mandates immutable log storage or SIEM integration (e.g., Splunk, Datadog).
  • Your team lacks Laravel expertise to troubleshoot integration issues (e.g., config caching, permissions).
  • You need log export (e.g., CSV, JSON) or third-party integrations (e.g., Jira, PagerDuty).

How to Pitch It (Stakeholders)

Executives:

"This open-source log viewer cuts debugging time by 30%+ with a 5-minute setup—no infrastructure costs or vendor lock-in. For $0, we replace ad-hoc CLI log checks with a secure, browser-based UI for Laravel, reducing reliance on DevOps. Ideal for dev/staging environments where speed matters most. Trade-off: Not a replacement for centralized logging, but a force multiplier for troubleshooting."

Engineering Teams:

*"Replace tail -f storage/logs/laravel.log with a searchable, color-coded log viewer accessible via /logs. Pros:

  • 3-step install: Composer + route + middleware.
  • Customizable: Publish Blade views/config to match your app’s design.
  • Lightweight: No assets, no bloat—just logs. Gotchas:
  • Lock behind auth middleware (logs often contain sensitive data).
  • Works best with uncompressed logs (.log, not .gz).
  • Not for production (use centralized logging there). Example route:
Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index'])->middleware('auth');
```"*

DevOps/Security:

*"Security Risks:

  • Logs may contain PII, API keys, or passwords. Misconfigured routes (e.g., unprotected /logs) could expose vulnerabilities.
  • Mitigations:
    • Restrict access via middleware (e.g., auth, admin, or IP whitelisting).
    • Exclude production from log viewer usage (environment checks in middleware).
    • Pair with log masking (e.g., laravel-masking) for sensitive data. Production Note: This is not a replacement for centralized logging (e.g., ELK, CloudWatch). Use only in dev/staging."*

Product Managers:

*"Use this to reduce MTTR for bugs in non-production environments. Example:

  • Add a /logs link to your staging dashboard for QA teams.
  • Trade-offs:
    • Skip if your roadmap includes a full observability platform (e.g., Datadog).
    • Not suitable for production or distributed logs. Quick Win: Implement in 2 hours vs. weeks of custom development."*

QA/Testers:

*"Stop asking Devs for logs—self-serve with /logs!

  • Filter by date/time to find specific errors.
  • Search for keywords (e.g., 500, timeout).
  • Works with Laravel’s daily log rotation. Tip: Bookmark the /logs page for your staging environment!"*
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.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony