PHPackages                             gboquizosanchez/filament-log-viewer - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. gboquizosanchez/filament-log-viewer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

gboquizosanchez/filament-log-viewer
===================================

Filament Log Viewer

2.2.3(3mo ago)25111.3k↓30.6%11[1 PRs](https://github.com/gboquizosanchez/filament-log-viewer/pulls)4MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Apr 24Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/gboquizosanchez/filament-log-viewer)[ Packagist](https://packagist.org/packages/gboquizosanchez/filament-log-viewer)[ Docs](https://github.com/gboquizosanchez)[ RSS](/packages/gboquizosanchez-filament-log-viewer/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (49)Used By (4)

Filament Log Viewer
===================

[](#filament-log-viewer)

[![Latest Stable Version](https://camo.githubusercontent.com/b3cf0360a4b2dd157b6e4c468319e9bfa4d0e93fe50ba8fb28e627547fb0dec4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67626f7175697a6f73616e6368657a2f66696c616d656e742d6c6f672d7669657765722e737667)](https://packagist.org/packages/gboquizosanchez/filament-log-viewer)[![Software License](https://camo.githubusercontent.com/4141875b9db06b6e19ee4c8c4f14f34b47dabb4fcdad7816e338a79666b0aacb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d7265642e737667)](https://packagist.org/packages/gboquizosanchez/filament-log-viewer)[![Total Downloads](https://camo.githubusercontent.com/c7d1ca242f417e9c646c717714369f6401dd94daea5e3a45d27035868855f663/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67626f7175697a6f73616e6368657a2f66696c616d656e742d6c6f672d7669657765722e737667)](https://packagist.org/packages/gboquizosanchez/filament-log-viewer)

Summary
-------

[](#summary)

This package allows you to manage and keep track of each one of your log files in Filament panels.

Based on [ARCANEDEV LogViewer](https://github.com/ARCANEDEV/LogViewer).

Starting 🚀
----------

[](#starting-)

### Prerequisites 📋

[](#prerequisites-)

- Composer.
- PHP version 8.2 or higher.

Versions 🔖
----------

[](#versions-)

PluginFilament1.x3.x2.x4.x - 5.xRunning 🛠️
----------

[](#running-️)

Install the package via composer:

```
composer require gboquizosanchez/filament-log-viewer
```

And register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`

```
->plugin(\Boquizo\FilamentLogViewer\FilamentLogViewerPlugin::make())
```

You can also publish the configuration file to customize the package:

```
php artisan vendor:publish --provider="Boquizo\FilamentLogViewer\FilamentLogViewerServiceProvider"
```

Important

In v4 it's necessary to set up a custom theme following the instructions in the [Filament Docs](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) first.

After setting up the custom theme, you need to add this line, if not, the plugin will not work properly.

```
@source '../../../../vendor/gboquizosanchez/filament-log-viewer/resources/views/**/*.blade.php';
```

### 🔧 Drivers

[](#-drivers)

By default, the plugin uses **LOG\_CHANNEL** as the driver.
To override this behavior, set the environment variable in your `.env` file:

```
FILAMENT_LOG_VIEWER_DRIVER=raw

```

#### 📌 Available Drivers

[](#-available-drivers)

DriverDescriptiondailyDefault driver used by the pluginsingleStandard Laravel single driverrawOnly available when explicitly using FILAMENT\_LOG\_VIEWER\_DRIVER; shows all log files👉 **Note:**
If `FILAMENT_LOG_VIEWER_DRIVER` is not defined, the plugin will continue using `LOG_CHANNEL`.

#### Example `.env` configuration

[](#example-env-configuration)

**Use the default LOG\_CHANNEL (daily):**

```
LOG_CHANNEL=daily

```

**Or override to use raw with FILAMENT\_LOG\_VIEWER\_DRIVER:**

```
FILAMENT_LOG_VIEWER_DRIVER=raw

```

### Others configurations

[](#others-configurations)

```
->plugins([
    \Boquizo\FilamentLogViewer\FilamentLogViewerPlugin::make()
        ->navigationGroup('System')
        ->navigationSort(2)
        ->navigationIcon(Heroicon::OutlinedDocumentText)
        ->navigationLabel('Log Viewer')
        ->timezone('Europe/Madrid')
        ->authorize(fn (): bool => auth()->user()->can('view-logs')),
    // Other plugins
])
```

### Custom Pages Configuration

[](#custom-pages-configuration)

You can customize the plugin pages by extending the base classes:

```
// app/Filament/Pages/CustomListLogs.php
