PHPackages                             czernika/orchid-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. [Admin Panels](/categories/admin)
4. /
5. czernika/orchid-log-viewer

ActiveLibrary[Admin Panels](/categories/admin)

czernika/orchid-log-viewer
==========================

Manage your Laravel app logs within Orchid admin panel

1.0.10(1y ago)0557MITPHPPHP ^8.1

Since Jan 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/czernika/orchid-log-viewer)[ Packagist](https://packagist.org/packages/czernika/orchid-log-viewer)[ RSS](/packages/czernika-orchid-log-viewer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (12)Used By (0)

Orchid log viewer
=================

[](#orchid-log-viewer)

[![Run tests](https://github.com/czernika/orchid-log-viewer/actions/workflows/tests.yml/badge.svg)](https://github.com/czernika/orchid-log-viewer/actions/workflows/tests.yml)

Log table layout designed in Orchid style allows you to view and manage Laravel application storage logs within admin panel

[![Orchid log table](https://github.com/czernika/orchid-log-viewer/raw/media/assets/screen.gif?raw=true)](https://github.com/czernika/orchid-log-viewer/blob/media/assets/screen.gif?raw=true)

Support
-------

[](#support)

Version 1.x requires PHP greater than 8.1, Orchid version 14 or higher and Laravel version 10+

VersionPHPLaravelOrchid1.x8.1+10.x14.xThis package is based on [rap2hpoutre/laravel-log-viewer](https://github.com/rap2hpoutre/laravel-log-viewer) package

Installation
------------

[](#installation)

Install package via composer

```
composer require czernika/orchid-log-viewer
```

That's it. Package registers menu item and screen for you. All you need to do now is to access `logs` page (it should be available under Orchid prefix, most likely it will be `/admin/logs`)

### Publish configuration

[](#publish-configuration)

If you need to publish configuration and localization files run following command

```
php artisan vendor:publish --provider="Czernika\OrchidLogViewer\OrchidLogServiceProvider"
```

Configuration file contains comments which should help you to understand this package little bit more

Configuration
-------------

[](#configuration)

This package is ready to work out of the box. However you may change any options you wish by your needs

### Changing default Screen

[](#changing-default-screen)

If you need to change some data on a Screen and there is no config option for that you still can completely override Screen itself

Create new custom screen class and extend it from `OrchidLogListScreen` class

```
use Czernika\OrchidLogViewer\Screen\OrchidLogListScreen;

class CustomLogListScreen extends OrchidLogListScreen
{
    // Change logic
}
```

Register it in `AppServiceProvider`. This way package will be aware of using custom screen instead of default one

```
use Czernika\OrchidLogViewer\LogManager;

public function boot()
{
    LogManager::useScreen(CustomLogListScreen::class);
}
```

Default layout consists of three parts - Filters, Modal for stack trace and Table. This mostly should be the same for custom screen. Table hits `logs` target - make sure it was returned within a `query()` method or change layout

### Changing default Layout

[](#changing-default-layout)

If you need to extend columns or add new one it is also possible

Same technique - create new class and extend it from `OrchidLogTableLayout` class

```
use Czernika\OrchidLogViewer\Layouts\OrchidLogTableLayout;

class CustomLogTableLayout extends OrchidLogTableLayout
{
    // Change logic
}
```

Register it in `AppServiceProvider`

```
use Czernika\OrchidLogViewer\LogManager;

public function boot()
{
    LogManager::useLayout(CustomLogTableLayout::class);
}
```

Add custom columns. You may use some of default columns as these:

```
public function columns(): iterable
{
    return [
        $this->levelColumn(), // Level icon with level name
        $this->textColumn(), // Log message text (70% table wide)
        $this->stackTraceColumn(), // Stack trace modal button
        $this->dateColumn(), // Date column
    ];
}
```

### Change LogData object

[](#change-logdata-object)

All logs returned as `Czernika\OrchidLogViewer\LogData` class. It has access to all properties from [rap2hpoutre/laravel-log-viewer](https://github.com/rap2hpoutre/laravel-log-viewer) package but in a object way

Basic log represents an array with the following data:

```
[
    'text' => '',
    'context' => '',
    'level' => '',
    'level_class' => '',
    'level_img' => '',
    'folder' => '',
    'in_file' => '',
    'date' => '',
]
```

This package converts it into `LogData` class with array of data as the only parameter in order to access all of it in a convinient way (via methods with the same name but in a camelCase) ...

```
$log->text();
$log->levelClass();

// etc
```

... plus to have access to Orchid column shortcuts

```
TD::make('text', 'Text'),

// instead of

TD::make('text', 'Text')
    ->render(fn (array $log) => $log['text']),
```

However if you wish you may change mapper class also and completely override its logic

Create new class

> Remember - it will accept only array of log data!

```
use Czernika\OrchidLogViewer\LogData;

class CustomLogData extends LogData
{
    public function areWeGood(): bool
    {
        return 'error' === $this->data['level'] ? 'Nope' : 'Sure we are';
    }
}
```

Register it

```
use Czernika\OrchidLogViewer\LogManager;

public function boot()
{
    LogManager::useMapper(CustomLogData::class);
}
```

Now you can render custom layout

```
TD::make('are_we_good')
    ->render(fn (LogData $log) => $log->areWeGood()),
```

If you wish to keep possibility for Orchid shortcuts name array of data as `$data` variable and use `Contentable` trait in custom class

```
use Czernika\OrchidLogViewer\Support\Traits\Contentable;

class CustomLogData
{
    use Contentable;

    public function __construct(
        protected readonly array $data,
    ) {}

    public function areWeGood(): bool
    {
        return 'error' === $this->data['level'] ? 'Nope' : 'Sure we are';
    }
}
```

And create column without render function

```
TD::make('areWeGood'), // pass name in a exact case as method in a custom class (not `are_we_good`)
```

> Of course you need to change Table layout also in case you need custom columns

### Change actions (clear and delete)

[](#change-actions-clear-and-delete)

Clear and delete actions basically clears and deletes files, shows toasts and redirects back to the specified route. If you need to do extra work you may change behavior of these actions by registering your own

> There is no event registered for exact this reason - you still have full control over process via custom Actions

```
use Czernika\OrchidLogViewer\LogManager;

public function boot()
{
    LogManager::clearLogFileUsing(CustomClearLogFileAction::class);
    LogManager::deleteLogFileUsing(CustomDeleteLogFileAction::class);
}
```

Every action should inherit `Czernika\OrchidLogViewer\Contracts\HandlesLogs` contract and therefore implement `handle` method

```
use Czernika\OrchidLogViewer\Contracts\HandlesLogs;
use Czernika\OrchidLogViewer\Contracts\LogServiceContract;

public function handle(LogServiceContract $logService, string $file): void
{
    // ...
}
```

`$logService` has access to methods to clear or delete file (as `clearFile($file)` and `deleteFile($file)`). `$file` variable contains basename of the log file (not the full path to it, eg 'laravel.log' and not '/var/www/html/storage/logs/laravel.log')

> Note - no need to redirect in action - it should NOT return any response Package handles redirects itself in order to prevent errors with selected file

### Other options

[](#other-options)

In a configuration file you can disable filters completely - it may be useful when you're using `stack` log channel and therefore you have one file only

Also you can disable registration of menu item and route completely but you have to re-register them on your own

Known issues
------------

[](#known-issues)

- Works only with "laravelish" logs - if you put for example `worker.log` which created by process managers like supervisor or pm2 it will not be recognized correctly
- 414 Error may occur when calling stack trace modal

Roadmap
-------

[](#roadmap)

- - Add option to exclude "unreadable" log files from filters
- - Add more permissions to see menu item and action buttons
- - Consider: maybe is it worth to register `platform.logs` permission which will be required in order to access screen?

Testing
-------

[](#testing)

Using [Pest](https://pestphp.com/) as testing tool

```
composer test
```

### TODOs

[](#todos)

- - Feature tests for custom screens/layout
- - Unit tests for custom objects
- - Tests for Filter

License
-------

[](#license)

Open-source under [MIT](LICENSE)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~22 days

Recently: every ~54 days

Total

11

Last Release

629d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a77482be22c3aa1d14943cdc0a2c3e608bd171ea8cdbed5ae48f10ca479acfe?d=identicon)[czernika](/maintainers/czernika)

---

Top Contributors

[![czernika](https://avatars.githubusercontent.com/u/86893348?v=4)](https://github.com/czernika "czernika (28 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/czernika-orchid-log-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/czernika-orchid-log-viewer/health.svg)](https://phpackages.com/packages/czernika-orchid-log-viewer)
```

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.4M207](/packages/backpack-crud)[conedevelopment/root

Root is an admin package for Laravel applications.

3713.1k2](/packages/conedevelopment-root)[eveseat/web

SeAT Web Interface

2723.2k135](/packages/eveseat-web)

PHPackages © 2026

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