munch/filament-logviewer
| Install | |
|---|---|
composer require munch/filament-logviewer |
|
| Latest Version: | 1.1.0 |
| PHP: | ^8.4 |
| Laravel: | 12 · 13 |
| License: | MIT |
| Last Updated: | Oct 19, 2026 |
| Links: | GitHub · Packagist |
Filament Logviewer
A simple and powerful Filament plugin to view, filter, and manage Laravel log files directly from your admin panel.
Features
- 📋 Search, sort and paginate
.logand rotated.log.1files in your configured log directory - 📂 Open a file by clicking its row, or switch files with a searchable picker
- 🔍 Parse and display log entries with full context
- 🎯 Filter by log level (emergency, alert, critical, error, warning, notice, info, debug)
- 📅 Filter by date/time range
- 🔎 Search messages, context, stack traces, timestamps, levels and environments
- 🗑️ Delete individual log files
- 🧹 Empty log files without deleting them
- 🎨 Color-coded log levels for easy identification
- ⚡ Optimized for large log files
Requirements
- PHP 8.4+
- Laravel 12.x or 13.x
- Filament 4.x or 5.x (Filament 5 uses Livewire 4)
Installation
Option A: From Packagist (Recommended)
Install via composer:
composer require munch/filament-logviewer
Option B: Local Development
For local development, add this to your Laravel project's composer.json:
{
"repositories": [
{
"type": "path",
"url": "../filament-logviewer"
}
]
}
Then require the package:
composer require munch/filament-logviewer:@dev
Usage
Register the plugin in your Filament Panel Provider (e.g., app/Providers/Filament/AdminPanelProvider.php):
use Munch\FilamentLogviewer\FilamentLogviewerPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ... other configuration
->plugins([
FilamentLogviewerPlugin::make(),
]);
}
}
The plugin will automatically register itself and appear in your Filament admin panel navigation under the "Settings" group.
Configuration
Publish the config file (optional):
php artisan vendor:publish --tag="filament-logviewer-config"
Customize the behavior in config/filament-logviewer.php:
return [
// Path to log files
'path' => storage_path('logs'),
// Maximum file size to read (10MB default)
'max_file_size' => 10 * 1024 * 1024,
// Entries per page
'per_page' => 50,
// Navigation settings
'navigation' => [
'group' => 'Settings',
'sort' => 100,
'icon' => 'heroicon-o-document-text',
],
// Date format
'date_format' => 'Y-m-d H:i:s',
// Log level colors
'levels' => [
'emergency' => ['label' => 'Emergency', 'color' => 'danger'],
'alert' => ['label' => 'Alert', 'color' => 'danger'],
'critical' => ['label' => 'Critical', 'color' => 'danger'],
'error' => ['label' => 'Error', 'color' => 'danger'],
'warning' => ['label' => 'Warning', 'color' => 'warning'],
'notice' => ['label' => 'Notice', 'color' => 'info'],
'info' => ['label' => 'Info', 'color' => 'success'],
'debug' => ['label' => 'Debug', 'color' => 'gray'],
],
];
Features Detail
Log File Management
- Find Files: Search filenames and sort by name, file size or last modified date. The overview is paginated and shows the newest files first.
- Delete Logs: Remove individual log files
- Empty Logs: Clear log file contents without deleting the file
Log Viewing & Filtering
- Detailed View: Click a file row or "View" to open its entries. Use "Switch file" to search for another filename, or "All log files" to return to the overview.
- Filter by Level: Select one or more severities, such as error and warning. Combine these with an environment and date range.
- Date Range Filter: Filter logs by timestamp range
- Search: Case-insensitive search within the selected file’s loaded entries, including messages, context and stack traces. Search and filters apply before pagination.
- Navigation: Sort entries by timestamp, level or environment and choose a page size. Click a row or "Details" to view the full entry.
- Auto-refresh: Tables refresh every 30 seconds. The viewer also has a manual "Refresh" button.
Log Entry Display
Each log entry shows:
- Timestamp
- Log level (color-coded badge)
- Environment
- Message
- Full message, context and stack trace in the entry details dialog
Performance
- Reads at most
max_file_sizebytes (10 MB by default) from the end of a file. An incomplete entry at the beginning of this portion is skipped. - A notice appears when a file is truncated. Search, filters and entry counts apply only to the loaded portion; older entries require a higher
max_file_sizeor a smaller/rotated file. - Pagination limits the number of rendered rows. Parsing and searching still process the loaded portion in memory.
- Supports Laravel/Monolog text logs, including multiline context and stack traces. JSON-formatted log files are not parsed.
- Only readable
.logand numbered rotations (.log.1,.log.2, etc.) directly inside the configured directory are shown. Paths outside it are rejected.
Development
composer install
composer test
composer format
The test suite covers file navigation, search, filters, sorting, pagination, entry details, file actions and path validation. CI runs it against Filament 4 and 5 on Laravel 12 and 13.
License
MIT License
Related Packages
Filament v5 admin UI for the communications domain - manage messages, deliveries...
A Filament plugin to manage Laravel Passport OAuth clients, tokens, and auth cod...
View all active user sessions and force-logout any user from your Filament admin...
ReactBits-inspired click spark particles for Filament admin panels
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.1.0 | ^8.4 | ^12.0| | MIT | |
| 1.0.15 | ^8.4 | ^12.0 | MIT |