ahmedmerza/logscope
| Install | |
|---|---|
composer require ahmedmerza/logscope |
|
| Latest Version: | v2.3.2 |
| PHP: | ^8.2 |
| Laravel: | 11 · 12 · 13 |
| Older releases: | 10 |
| License: | MIT |
| Last Updated: | Oct 12, 2026 |
| Links: | GitHub · Packagist |
LogScope
A log viewer for Laravel that stores your logs in your own database, so you can search, filter and triage them from the browser.
Search by field (level:error, user_id:42) or across everything. Repeated errors are grouped into one issue with a count, and when you mark an issue resolved it stays resolved, unless it happens again. LogScope is designed to be left on in production, and it works alongside Telescope in development or an exception tracker like Sentry.

Quick Start
composer require ahmedmerza/logscope
php artisan logscope:install
php artisan migrate
Visit /logscope in your browser. That's it!
What's New
v2.3.2: the grouped view applies the date range, every search row and exclude terms (and hands off to All entries for filters it can't apply), timings and sizes like 172ms no longer split one issue into many groups, and dialogs take keyboard focus.
Upgrading: no migration. Full notes are in the changelog.
✨ Features
- Captures everything, no setup. Every log from every channel, each with its trace ID, user ID, IP, URL and user agent.
- Search and filters.
field:valuesearch, regex and a NOT toggle. Include or exclude by level, channel, HTTP method and date range, with one-click quick filters. - Issues and triage. Repeated entries are grouped into one issue with an occurrence count. Mark an issue open, investigating, resolved or ignored, and add notes. A resolved issue reopens if it happens again.
- Readable context. Collapsible, syntax-highlighted JSON. Request and model objects are expanded, and passwords, tokens and other sensitive keys are redacted.
- Keyboard-first. Vim-style navigation, and one key to change an issue's status and move to the next. Dark mode included.
- Shareable. Filters live in the URL, and every entry has its own link.
- Fast on big tables. Keyset pagination, writes batched until after the response, and indexes on the common filters.
📋 Requirements
- PHP 8.2+ (8.3+ for Laravel 13)
- Laravel 11, 12 or 13
- SQLite, MySQL, or PostgreSQL
🤔 When to Use LogScope
LogScope stores logs in your database - a deliberate choice that works great for most Laravel apps.
Great fit if you:
- Want log visibility without external services
- Have a typical Laravel app (up to ~100K requests/day)
- Need rich search and filtering
- Prefer simplicity over infrastructure complexity
Consider alternatives if you:
- Process millions of requests daily
- Need months/years of log retention
- Already use centralized logging (Datadog, CloudWatch, ELK)
How LogScope handles common concerns:
| Concern | Solution |
|---|---|
| Database bloat | Retention policies with scheduled pruning (default: 30 days) |
| Performance | Batch mode writes logs after response is sent |
| Query speed | Proper indexes on common filter combinations |
🔒 Authorization
Outside the local environment, /logscope is closed until you allow access. Checked in order:
1. Custom Callback:
LogScope::auth(fn ($request) => $request->user()?->isAdmin());
2. Gate:
Gate::define('viewLogScope', fn ($user) => $user->hasRole('admin'));
3. Default: Only accessible in local environment.
📚 Documentation
- Configuration — capture and write modes, writes during transactions, retention, noise filters, routes, theme, redaction of sensitive keys and headers, and every environment variable.
- Usage — search syntax, the status workflow and custom statuses, quick filters, keyboard shortcuts, custom context, and the Artisan commands.
- Production Deployment — recommended settings, scheduling
logscope:prune, and high-traffic apps. - JSON API — the opt-in, token-authenticated v1 API for native clients: setup with Sanctum, access, and every endpoint.
- Known Limitations — the few kinds of log that bypass Laravel's logger, and what to do about each.
🛡️ Extensions
Watchtower
Block malicious IPs and sync the blacklist across all your environments automatically. Blocking is done from Watchtower's own dashboard — LogScope shows you the traffic, Watchtower acts on it. (Previously named ahmedmerza/logscope-guard.)
composer require ahmedmerza/watchtower
php artisan watchtower:install
🤝 Contributing
Contributions are welcome! Please open an issue or submit a pull request.
📄 License
MIT License. See LICENSE for details.
Related Packages
Tracing and observability for Laravel with dispatchers, masking, and profiling.
Read and search your Laravel log files without leaving your Filament panel.
An elegant debug assistant for the Laravel framework compatible with mongodb.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v2.3.2 | ^8.2 | ^11.0| | MIT | |
| v2.3.1 | ^8.2 | ^11.0| | MIT | |
| v2.3.0 | ^8.2 | ^11.0| | MIT | |
| v2.2.0 | ^8.2 | >=11.0 | MIT | |
| v2.1.0 | ^8.2 | >=11.0 | MIT | |
| v2.0.0 | ^8.2 | >=11.0 | MIT | |
| v1.8.0 | ^8.2 | >=10.0 | MIT | |
| v1.7.1 | ^8.2 | >=10.0 | MIT | |
| v1.7.0 | ^8.2 | >=10.0 | MIT | |
| v1.6.1 | ^8.2 | >=10.0 | MIT | |
| v1.6.0 | ^8.2 | >=10.0 | MIT | |
| v1.5.9 | ^8.2 | >=10.0 | MIT | |
| v1.5.8 | ^8.2 | >=10.0 | MIT | |
| v1.5.7 | ^8.2 | >=10.0 | MIT | |
| v1.5.6 | ^8.2 | >=10.0 | MIT | |
| v1.5.5 | ^8.2 | >=10.0 | MIT | |
| v1.5.4 | ^8.2 | >=10.0 | MIT | |
| v1.5.3 | ^8.2 | >=10.0 | MIT | |
| v1.5.2 | ^8.2 | >=10.0 | MIT | |
| v1.5.1 | ^8.2 | ^10.0| | MIT | |
| v1.5.0 | ^8.2 | ^10.0| | MIT | |
| v1.4.2 | ^8.2 | ^10.0| | MIT | |
| v1.4.1 | ^8.2 | ^10.0| | MIT | |
| v1.4.0 | ^8.2 | ^10.0| | MIT | |
| v1.3.1 | ^8.2 | ^10.0| | MIT | |
| v1.3.0 | ^8.2 | ^10.0| | MIT | |
| v1.2.2 | ^8.2 | ^10.0| | MIT | |
| v1.2.1 | ^8.2 | ^10.0| | MIT | |
| v1.2.0 | ^8.2 | ^10.0| | MIT | |
| v1.1.1 | ^8.2 | ^10.0| | MIT |
Showing the latest 30 of 45. See every release on Packagist