Download the PHP package netojose/laravel-log-viewer without Composer
On this page you can find all versions of the php package netojose/laravel-log-viewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download netojose/laravel-log-viewer
More information about netojose/laravel-log-viewer
Files in netojose/laravel-log-viewer
Package laravel-log-viewer
Short Description A Laravel package for viewing and managing application log files.
License MIT
Informations about the package laravel-log-viewer
netojose/laravel-log-viewer
A Laravel 11+ package for viewing, filtering, downloading and clearing application log files — directly in the browser.
Features
- View and parse
storage/logs/laravel.log(and additional log files) - Filter entries by log level (EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG)
- Pagination for large log files
- Download any log file
- Clear (truncate) any log file
- Route protection via Laravel Gate
- Pure HTML/CSS UI — zero JavaScript/CSS framework dependencies
- Publishable config and views
Requirements
- PHP
^8.2 - Laravel
^11.0 || ^12.0 || ^13.0
Installation
The service provider is registered automatically via Laravel's package auto-discovery.
Publish the config (optional)
This copies config/log-viewer.php to your application's config directory.
Publish the views (optional)
Usage
After installation, visit:
Configuration
Authorization
By default, the viewLogViewer gate allows access only in the local environment. In any other environment (staging, production) access is denied with a 403.
To customize access, define the gate in your AppServiceProvider (or any service provider):
To allow access for guests (unauthenticated users), accept a nullable user:
To disable gate checks entirely, set 'gate' => null in your config.
Adding extra log files
Any entry in the logs config key becomes available in the log viewer:
Security note: Only files explicitly listed in the config can be accessed. User input is never used to derive file paths.
Available Routes
| Method | URI | Name | Description |
|---|---|---|---|
| GET | /log-viewer |
log-viewer.index |
List all log files |
| GET | /log-viewer/{file} |
log-viewer.show |
View log entries (?level=ERROR&page=2) |
| GET | /log-viewer/{file}/download |
log-viewer.download |
Download log file |
| DELETE | /log-viewer/{file} |
log-viewer.destroy |
Clear (truncate) log file |
Disabling the package
Set the environment variable:
Routes will not be registered and the viewer will return 404.
License
MIT