achyutn / filament-log-viewer
A Filament package to view and manage Laravel logs.
Fund package maintenance!
achyutkneupane
Patreon
Buy Me A Coffee
Requires
- php: >=8.2
- calebporzio/sushi: ^2.5
- filament/filament: ^3.0
Requires (Dev)
- laravel/pint: ^1.23
- rector/rector: ^2.1
README
A Filament plugin to read and display Laravel log files in a clean, searchable table with stack traces and filtering.
Installation
composer require achyutn/filament-log-viewer
Register the plugin inside your Filament panel:
use AchyutN\FilamentLogViewer\FilamentLogViewer; return $panel ->plugins([ FilamentLogViewer::make(), ]);
Usage
After installation, visit /logs
in your Filament panel. You will see a table of log entries.
Table Columns
- Log Level – Badge with color mapped from log level
- Environment (Toggleable) – Application environment (
local
,production
, etc.) - File (Toggleable) – Log file name (e.g.,
laravel.log
) - Message – Short summary of the log
- Occurred – Human-readable date/time
Click the view action to inspect stack traces.
Filters
Log Levels
You can filter the logs according to log level. The filters are available as tabs above the table:
Date
You can filter logs by date using the date picker in the top right corner of the table. This allows you to select a specific date range to view logs.
Extending
You can customize navigation label, icon, sort, etc. using:
use AchyutN\FilamentLogViewer\FilamentLogViewer; FilamentLogViewer::make() ->authorize(fn () => auth()->check()) ->navigationGroup('System') ->navigationIcon('heroicon-o-document-text') ->navigationLabel('Log Viewer') ->navigationSort(10) ->navigationUrl('/logs') ->pollingTime(null); // Set to null to disable polling
License
This package is open-sourced software licensed under the MIT license.
Changelog
See the CHANGELOG for details on changes made in each version.
Contributing
Contributions are welcome! Please create a pull request or open an issue if you find any bugs or have feature requests.
Support
If you find this package useful, please consider starring the repository on GitHub to show your support.