fqathf / loglytics
A lightweight and powerful Crashlytics-like log viewer package for Laravel.
v1.0.1
2026-07-13 04:45 UTC
Requires
- php: ^8.1
- illuminate/database: ^10.0|^11.0
- illuminate/http: ^10.0|^11.0
- illuminate/routing: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
- illuminate/view: ^10.0|^11.0
Requires (Dev)
- larastan/larastan: ^2.0
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.0|^11.0
This package is auto-updated.
Last update: 2026-07-13 05:07:10 UTC
README
A lightweight and powerful Crashlytics-like log viewer package for Laravel. Parse, track, and manage your Laravel application logs with a beautiful standalone UI.
Features
- Crashlytics-style Error Grouping — Errors automatically grouped by exception type
- Bug Status Tracking — Mark occurrences as
solvedoropen - Bulk Status Updates — Select and update multiple entries at once
- Level Filtering — Filter by ERROR, WARNING, INFO, DEBUG
- Date Range Filtering — Preset ranges (1 day, 1 week, etc.) or custom dates
- Severity & Trend Analysis — Visual indicators for severity and trend direction
- CSV Export — Export filtered log data to CSV
- Dark Mode — Toggle between light and dark themes
- Log Caching — Parsed results cached for better performance
- Standalone UI — Bootstrap 5 + Feather Icons via CDN, no conflicts with your admin panel
- Configurable Authorization — Gate-based or allow-list authorization
- Rate Limiting — Built-in rate limiting on write operations
- Supports Laravel 10, 11
Requirements
- PHP ^8.1
- Laravel ^10.0 | ^11.0
- SQLite or MySQL/PostgreSQL (for bug status tracking)
Installation
composer require fqathf/loglytics
The service provider is auto-discovered. Run migrations:
php artisan migrate
Optional: Publish Configuration
# Publish config only php artisan vendor:publish --tag=loglytics-config # Publish views (to customize UI) php artisan vendor:publish --tag=loglytics-views # Publish migrations (to customize table) php artisan vendor:publish --tag=loglytics-migrations
Quick Start
Navigate to /log-viewer in your browser. Done!
Configuration
Route & Middleware
// config/loglytics.php 'route' => [ 'prefix' => 'log-viewer', // Change URL prefix 'middleware' => ['web', 'auth'], // Add your middleware 'domain' => null, // e.g. 'logs.example.com' ],
Authorization
Protect the log viewer with a Gate:
// app/Providers/AuthServiceProvider.php public function boot() { Gate::define('viewLogViewer', function ($user) { return $user->isAdmin(); }); }
// config/loglytics.php 'authorization' => [ 'enabled' => true, 'gate' => 'viewLogViewer', ],
Or use an allow-list:
'authorization' => [ 'enabled' => true, 'allow_only' => [1, 2, 3], // User IDs ],
UUID Support
If your users table uses UUIDs:
'database' => [ 'user_model' => \App\Models\User::class, 'user_primary_key_type' => 'uuid', ],
Custom Log Path
'log_path' => '/var/log/my-app', // Absolute path
Caching
'cache' => [ 'enabled' => true, 'prefix' => 'loglytics', 'ttl' => 60, // seconds ],
Integration Guide
Minimal Setup
composer require fqathf/loglytics
php artisan migrate
# Visit /log-viewer
Production Setup
// config/loglytics.php return [ 'route' => [ 'prefix' => 'admin/logs', 'middleware' => ['web', 'auth', 'admin'], ], 'authorization' => [ 'enabled' => true, 'gate' => 'viewLogViewer', ], 'cache' => [ 'enabled' => true, 'ttl' => 120, ], ];
Customizing Views
php artisan vendor:publish --tag=loglytics-views
# Edit resources/views/vendor/loglytics/*.blade.php
Package Structure
fqathf/loglytics/
├── config/loglytics.php
├── database/migrations/
├── resources/views/
├── routes/web.php
├── src/
│ ├── Http/Controllers/LogViewerController.php
│ ├── Models/LogBugStatus.php
│ ├── Services/LogViewerService.php
│ └── LogViewerServiceProvider.php
├── CHANGELOG.md
├── CONTRIBUTING.md
└── README.md
Security
If you discover a security vulnerability, please report it through GitHub Security Advisories instead of using the issue tracker.
License
MIT License. See LICENSE for details.