Search by

jaydeepbinary / laravel-log-viewer

JaydeepBinary

A beautiful, developer-friendly Laravel log viewer with live search, level filtering, and a professional UI.

Package info

gitlab.com/Jaydeepbinary/laravel-log-viewer

Issues

pkg:composer/jaydeepbinary/laravel-log-viewer

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.2 2026-09-23 18:46 UTC

This package is not auto-updated.

Last update: 2026-11-07 11:05:38 UTC


README

Latest Version on Packagist Total Downloads PHP Version License

A modern, fast, and developer-friendly Log Viewer for Laravel applications. Features a clean, professional UI, real-time client-side search, log-level filtering with count badges, one-click copy, expandable stack traces, and smooth animations — accessible at /log-viewer.

⚡ Highlights

  • 🚀 Zero Config Setup: Works out of the box immediately upon composer require. CSS & JS are automatically served via built-in routes — no required asset publishing!
  • 🎨 Clean & Professional UI: Light theme with level-coded row stripes, pulsing severity badges, and staggered entry animations.
  • 🔍 Instant Live Search: Filter entries in real-time as you type without reloading.
  • ⌨️ Keyboard Friendly: Press / to focus search instantly, Escape to reset.
  • 🏷️ Log Level Filters with Counts: Quickly toggle levels (EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG) with live counter badges.
  • 📋 Copy to Clipboard: Hover over any row to quickly copy the log message.
  • 📜 Collapsible Stack Traces: Clean presentation of error traces and context.
  • 📊 Stats Bar: Summary breakdown of entries by severity level.
  • 📱 Responsive: Smoothly adapts to desktop, tablet, and mobile screens.

📋 Requirements

  • PHP: ^8.2
  • Laravel: 10.x | 11.x | 12.x | 13.x

📦 Installation

Install the package via Composer:

composer require jaydeepbinary/laravel-log-viewer

The package will automatically register its service provider via Laravel package discovery.

Open the Log Viewer

Start your development server if it isn't already running:

php artisan serve

Visit:

http://localhost:8000/log-viewer

⚙️ Configuration (Optional)

You can publish the configuration file to customize the route path, middleware, and settings:

php artisan vendor:publish --tag=log-viewer-config

This creates config/log-viewer.php:

return [

    /*
     * Enable or disable the log viewer dashboard.
     */
    'enabled' => true,

    /*
     * The URL path where the log viewer is accessible.
     */
    'route' => 'log-viewer',

    /*
     * Middleware applied to the log viewer routes.
     * In production, add 'auth' to restrict access.
     */
    'middleware' => [
        'web',
        // 'auth',
    ],

    /*
     * Path where your Laravel log files are stored.
     */
    'log_path' => storage_path('logs'),

    /*
     * Maximum number of entries parsed per log file.
     */
    'per_page' => 200,

];

🔒 Securing in Production

By default, the viewer is accessible with the web middleware. In production environments, protect it by adding authentication or authorization middleware in config/log-viewer.php:

'middleware' => [
    'web',
    'auth', // e.g., 'auth', 'can:view-logs'
],

🎨 Asset Publishing (Optional)

💡 Note: Assets (CSS and JS) are automatically served by the package via dedicated routes. You do not need to publish them.

If you prefer your web server (Nginx/Apache) to serve static assets directly from your public/ directory for high-traffic environments, you can publish them:

php artisan vendor:publish --tag=log-viewer-assets

⌨️ Keyboard Shortcuts

ShortcutAction
/Focus search bar
EscapeClear search and blur

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page or submit a pull request.

📄 License

This package is open-sourced software licensed under the MIT license.