PHPackages                             alfism1/filament-log-management - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. alfism1/filament-log-management

ActiveLibrary

alfism1/filament-log-management
===============================

A Filament 3 log viewer that filters Laravel log entries by the process that produced them — cron, queue, booking, live chat, and anything else you configure.

v1.0.0(today)02↑2900%MITPHPPHP ^8.2CI passing

Since Aug 8Pushed todayCompare

[ Source](https://github.com/alfism1/filament-log-management)[ Packagist](https://packagist.org/packages/alfism1/filament-log-management)[ Docs](https://github.com/alfism1/filament-log-management)[ RSS](/packages/alfism1-filament-log-management/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (8)Versions (2)Used By (0)

Filament Log Management
=======================

[](#filament-log-management)

A Filament 3 log viewer that filters Laravel log entries by **the process that produced them** — cron, queue, mail, database, and whatever domain processes you configure — on top of the usual level / text / date filters.

- Reads every `*.log` in `storage/logs`, newest entry first
- Groups entries into configurable **processes**, with hit counts in the filter dropdowns
- Full-text search across message, context and stack trace
- Rows expand to show the full message, pretty-printed context and the stack trace
- Unwraps Laravel exception entries, whose trace is buried inside the JSON `exception` key
- Auto-refresh, download, empty and delete actions
- Never loads a whole file: it streams backwards from the end under a scan budget
- English and Indonesian translations included

Requirements
------------

[](#requirements)

PHP8.2+Laravel11 / 12Filament3.2+Installation
------------

[](#installation)

```
composer require alfism1/filament-log-management
```

Register the plugin on the panel:

```
use Alfism1\FilamentLogManagement\FilamentLogManagementPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(FilamentLogManagementPlugin::make());
}
```

That's it — the page appears under a **Developer** navigation group at `/admin/log-management`.

Publish the config to change anything:

```
php artisan vendor:publish --tag=filament-log-management-config
```

Views and translations are publishable too, with `--tag=filament-log-management-views` and `--tag=filament-log-management-translations`.

Configuring the plugin
----------------------

[](#configuring-the-plugin)

Everything is optional; anything left unset falls back to the config file.

```
FilamentLogManagementPlugin::make()
    ->navigationGroup('Developer')
    ->navigationSort(4)
    ->navigationIcon('heroicon-o-document-magnifying-glass')
    ->navigationLabel('Log Management')
    ->slug('logs')
    ->registerNavigation(fn () => app()->environment('local', 'staging'))
    ->authorize(fn () => auth()->user()->can('page_LogViewer'))
    ->usingPage(MyLogViewer::class)
```

Processes — the point of the package
------------------------------------

[](#processes--the-point-of-the-package)

Every entry is classified into the **first** matching process, so config order matters: put specific processes above general ones. A process matches when either

- **`files`** — the log file name matches one of its globs, or
- **`patterns`** — one of its regexes matches `" "`.

An explicit `[tag]` prefix on the message always wins over both:

```
Log::info('[cron] nightly quota rebuild finished', ['trips' => $count]);
Log::error('[booking] refund failed', ['booking_id' => $booking->id]);
```

The tag is matched against every process key and its `aliases`. A tag matching nothing configured still gets its own filter option, labelled from the tag — so `[midtrans-webhook]` shows up as "Midtrans Webhook" with no config change at all.

### Adding your own

[](#adding-your-own)

The shipped defaults cover framework concerns only (scheduler, queue, notification, mail, upload, auth, database, http). Add your domain processes **above** them in the published config:

```
'processes' => [

    'booking' => [
        'label' => 'Booking',
        'color' => 'primary',                  // Filament badge colour
        'icon' => 'heroicon-o-ticket',
        'aliases' => ['bookings'],             // also matched as a [tag]
        'files' => ['booking-*.log'],          // optional
        'patterns' => [
            '/\bbooking/i',                    // prose: "booking created"
            '/[a-z]Booking/',                  // identifiers: "saveBooking failed"
        ],
    ],

    // ... the shipped defaults follow
],
```

Domain nouns want that **pattern pair**: `/\bword/i` catches prose, `/[a-z]Word/` catches camelCase identifiers quoted in the message. The camelCase form is also what stops `stripe` from matching a `trip` process.

Order tips learned the hard way: put `invoice` and `payment` above `booking` (a message mentioning both is usually about the more specific one), and a dedicated-channel process like `livechat` above the generic one it would otherwise fall into.

Scan depth
----------

[](#scan-depth)

Log files grow without bound, so the file is never fully loaded. It is read backwards in 256 KB chunks and parsed newest-first, stopping at the requested depth (default 2,000 entries), the `max_bytes` cap, or the start of the file.

**Filters therefore apply to the last N entries, not to the whole file.** When the scan stops early the page says so and points at the depth selector. Raising the depth costs a linear scan — roughly 900 entries across 3.8 MB parses in ~150 ms.

Authorization
-------------

[](#authorization)

By default any user who can reach the panel can open the page. To gate it, either set a Gate ability in the config:

```
'authorization' => [
    'permission' => 'page_LogViewer',
],
```

or pass a closure to the plugin, which overrides the config:

```
->authorize(fn () => auth()->user()->hasRole('developer'))
```

### With Filament Shield

[](#with-filament-shield)

Shield discovers plugin-registered pages, so:

```
php artisan shield:generate --page=LogViewer
```

then set `'permission' => 'page_LogViewer'`, or use `->authorize(fn () => auth()->user()->can('page_LogViewer'))`. `super_admin` passes either way through Shield's `Gate::before`.

Config reference
----------------

[](#config-reference)

KeyDefaultPurpose`navigation.register``true`Whether the menu item is registered.`navigation.group``Developer`Navigation group.`navigation.sort``null`Navigation sort.`navigation.icon``heroicon-o-document-magnifying-glass`Menu icon.`navigation.label``null``null` = the translated default.`navigation.slug``log-management`URL segment.`authorization.permission``null`Gate ability required to view. `null` = anyone on the panel.`path``storage_path('logs')`Directory scanned.`pattern``*.log`Which files appear in the picker.`scan_entries``2000`Default scan depth.`scan_options``[500, 2000, 10000, 50000]`Choices in the depth selector.`max_matches``5000`Cap on matched entries held in memory.`max_bytes`64 MBCap on bytes read per request.`per_page``25`Rows per page.`poll_interval``10`Seconds between auto-refresh polls.`allow_delete``LOG_MANAGEMENT_ALLOW_DELETE`, `true`Shows the empty/delete actions.Set `LOG_MANAGEMENT_ALLOW_DELETE=false` in production if log files should only ever be rotated by the system.

Under the hood
--------------

[](#under-the-hood)

ClassRole`Support\LogFileRegistry`Discovers log files; resolves a requested name against the discovered set, so a name from the browser can never escape the log directory.`Support\LogReader`Streams a file backwards in chunks, applying filters during the scan.`Support\LogParser`Splits a line into level / message / context / trace, bracket-matching from the end so braces in a message are not mistaken for JSON.`Support\LogProcessResolver`Classifies an entry into a process.`Data\*`Immutable value objects for entries, files, queries and scan results.Testing
-------

[](#testing)

```
composer install
composer test
```

License
-------

[](#license)

MIT. See [LICENSE.md](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19965233?v=4)[Alfi Samudro Mulyo](/maintainers/alfism1)[@alfism1](https://github.com/alfism1)

---

Top Contributors

[![alfism1](https://avatars.githubusercontent.com/u/19965233?v=4)](https://github.com/alfism1 "alfism1 (2 commits)")

---

Tags

laravellogslog viewerfilamentfilament-pluginlog management

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/alfism1-filament-log-management/health.svg)

```
[![Health](https://phpackages.com/badges/alfism1-filament-log-management/health.svg)](https://phpackages.com/packages/alfism1-filament-log-management)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

277333.4k10](/packages/croustibat-filament-jobs-monitor)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17861.9k3](/packages/stephenjude-filament-jetstream)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
