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 Good Log Viewer Laravel Package

golovchanskiy/laravel-good-log-viewer

LaravelGoodLogViewer is a simple log reader, parser, and viewer for Laravel 5. Install via Composer, register the service provider and facade, publish config/translations, then browse logs at /logs. Includes English and Russian locales.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Lightweight Log Viewer: The package provides a minimal, self-contained log viewer for Laravel 5.x, fitting well in architectures where observability is needed without external tools (e.g., ELK, Datadog). It leverages Laravel’s native logging system, making it a low-overhead solution for debugging and monitoring.
  • Facade-Based Access: The facade (GoodLogViewer) simplifies log retrieval/parsing, but may introduce tight coupling if overused in business logic. Prefer direct dependency injection for critical paths.
  • Laravel 5.x Legacy Constraint: If the project is on Laravel 5.x, this is a direct fit; otherwise, it requires backporting or replacement (e.g., Laravel Debugbar or custom solutions).

Integration Feasibility

  • Composer Dependency: Simple composer require installation with minimal configuration (service provider + alias).
  • Log Parsing/Filtering: Supports basic log filtering (e.g., by level, date) but lacks advanced features like structured log analysis or real-time streaming. May require custom extensions.
  • UI Limitations: The /logs endpoint is a basic web UI—not suitable for production-grade observability but adequate for local/dev environments.

Technical Risk

  • Laravel 5.x Deprecation: High risk if migrating to Laravel 8/9+; no active maintenance or Laravel 8+ compatibility.
  • Security: Exposing /logs publicly could leak sensitive data. Must be gated behind middleware (e.g., auth:api or trusted).
  • Performance: Log parsing happens on-demand; could become a bottleneck if logs are large (GBs) or accessed frequently.
  • Localization Gaps: Only supports ru/en; may need i18n extensions for other languages.

Key Questions

  1. Is Laravel 5.x the target LTS version? If not, what’s the migration timeline?
  2. Are logs sensitive? If yes, how will access be secured (e.g., IP whitelisting, rate limiting)?
  3. What’s the expected log volume? For >100MB logs, consider a dedicated solution (e.g., Papertrail, Sentry).
  4. Do we need structured log analysis? If yes, will this package require custom parsing logic?
  5. How will this integrate with existing monitoring? (e.g., alerts, dashboards)

Integration Approach

Stack Fit

  • Best For:
    • Laravel 5.x projects needing a quick, no-frills log viewer.
    • Local/dev environments where simplicity outweighs scalability.
  • Avoid For:

Migration Path

  1. Installation:
    composer require golovchanskiy/laravel-good-log-viewer
    php artisan good-log-viewer:publish
    
    • Update config/app.php with provider/alias.
  2. Configuration:
    • Customize config/good-log-viewer.php (e.g., log paths, retention).
    • Secure the /logs route:
      Route::get('/logs', function () {
          return GoodLogViewer::show();
      })->middleware(['auth:api', 'throttle:60,1']);
      
  3. Testing:
    • Verify log parsing for custom monolog handlers (if used).
    • Test edge cases: empty logs, malformed entries.

Compatibility

  • Laravel 5.x Only: No support for newer Laravel versions. If upgrading, evaluate alternatives.
  • Monolog Integration: Works with Laravel’s default Monolog setup but may need adjustments for custom handlers (e.g., Slack, Syslog).
  • Blade/Template Overrides: The UI is Blade-based; can be extended but requires manual template modifications.

Sequencing

  1. Phase 1 (Dev/Staging):
    • Deploy to non-production first to validate log parsing and UI.
    • Monitor performance impact on log-heavy endpoints.
  2. Phase 2 (Production):
    • If adopted, restrict access via middleware and document as a debug-only tool.
    • Consider archiving logs to reduce /logs endpoint load.

Operational Impact

Maintenance

  • Low Effort: Minimal moving parts; updates are composer update + config checks.
  • Risk of Abandonware: No recent commits or Laravel 8+ support. Forking may be needed for long-term use.
  • Dependency Bloat: Adds ~1–2MB to vendor size; negligible for most projects.

Support

  • Limited Community: 1 star, no issues/PRs. Debugging will rely on source diving or Laravel forums.
  • Documentation: README is basic; expect to reverse-engineer advanced use cases.
  • SLA: Nonexistent. Treat as a best-effort tool.

Scaling

  • Not Production-Grade:
    • Throughput: Parsing large logs on-demand may time out (PHP’s memory limits).
    • Storage: No log archival or cleanup; risk of disk bloat.
  • Workarounds:
    • For scaling, pair with log rotation (e.g., Laravel’s log-rotate package) and external log shippers (e.g., Filebeat).

Failure Modes

Scenario Impact Mitigation
Log file corruption UI errors, missing entries Backup logs; use log:clear cautiously.
High traffic to /logs Server overload Rate limit; cache parsed logs (e.g., Redis).
Laravel 5.x upgrade Package breaks Fork and backport or replace.
Sensitive data leaks Security breach Restrict route access; sanitize logs.

Ramp-Up

  • Developer Onboarding:
    • Time: 30–60 mins to install/configure.
    • Skills Needed: Basic Laravel service provider/route setup.
  • Advanced Use Cases:
    • Custom log parsing: Requires extending Golovchanskiy\LaravelGoodLogViewer\LogParser.
    • Localization: Override Blade templates or extend language files.
  • Training:
    • Document the /logs endpoint’s security boundaries (e.g., "Do not use in production").
    • Train ops teams on log rotation to prevent disk issues.
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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai