PHPackages                             iyogesharma/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. iyogesharma/log-viewer

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

iyogesharma/log-viewer
======================

Log Viewer for Laravel with a bounded-memory streaming index engine for large log files. Fork of arcanedev/log-viewer.

2.1.1(2w ago)1116MITPHPPHP &gt;=7.3CI failing

Since May 14Pushed 3w agoCompare

[ Source](https://github.com/iYogesharma/logviewer-laravel)[ Packagist](https://packagist.org/packages/iyogesharma/log-viewer)[ Docs](https://github.com/iYogesharma/logviewer-laravel)[ RSS](/packages/iyogesharma-log-viewer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (7)Dependencies (12)Versions (13)Used By (0)

LogViewer for Laravel
=====================

[](#logviewer-for-laravel)

### Investigate Laravel logs without loading giant files into memory.

[](#investigate-laravel-logs-without-loading-giant-files-into-memory)

Searchable log streams, bounded-memory indexing, operational analytics, and two modern opt-in themes—without a frontend build step.

[![Release](https://camo.githubusercontent.com/a6b8cfa0fb4070838202a20ff1ad613315b59487dec6cb9a96461c90a6128389/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f69596f6765736861726d612f6c6f677669657765722d6c61726176656c3f7374796c653d666c61742d737175617265)](https://github.com/iYogesharma/logviewer-laravel/releases)[![Tests](https://camo.githubusercontent.com/856e38fe7bc5381db445a079231084e92de86596e82f9e3a1b3a9be2a5a6839c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f69596f6765736861726d612f6c6f677669657765722d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/iYogesharma/logviewer-laravel/actions)[![Laravel](https://camo.githubusercontent.com/143b57c2718b206d79e6c32cc13bcd44aad4330e296b01415077dba6b5236e1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382532422d6666326432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](#requirements)[![PHP](https://camo.githubusercontent.com/628556022e5809b1a46f78738cc8390a2472109acc9982410e3bfcde45b5a046/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e332532422d3737376262343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](#requirements)[![License](https://camo.githubusercontent.com/26ad06a785ced5afe9012b9a512c2ff19630bf47640cb34bb015818620100936/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69596f6765736861726d612f6c6f677669657765722d6c61726176656c3f7374796c653d666c61742d737175617265)](LICENSE.md)

**A fork of [ARCANEDEV/LogViewer](https://github.com/ARCANEDEV/LogViewer) · current release line `2.x`**

[Quick start](#quick-start) · [Themes](#themes) · [Large files](#large-file-streaming) · [Upgrade guide](UPGRADE.md) · [Changelog](CHANGELOG.md)

[![The Observatory theme's dashboard: total events, high-severity share, error trend over time, and highest-risk files](_screenshots/observatory-dashboard.png)](_screenshots/observatory-dashboard.png)

Observatory theme · see [all screenshots](#themes)

---

Why this fork?
--------------

[](#why-this-fork)

This package is a fork of [ARCANEDEV/LogViewer](https://github.com/ARCANEDEV/LogViewer). It keeps the original `Arcanedev\LogViewer\` namespace, configuration keys, routes and public API, so it installs as a drop-in replacement — see [Migrating from `arcanedev/log-viewer`](#migrating-from-arcanedevlog-viewer).

Traditional log viewers eventually hit the same wall: opening or searching a large file requires reading the whole thing into memory. Version 2 introduces a binary sidecar index and reads only the entries needed for the current request.

CapabilityWhat it providesBounded-memory streamingPaginate and search multi-megabyte logs without a whole-file readSafe cold startServe a bounded tail while an index is warmingIncremental indexingAppend new log entries without rebuilding unchanged dataFormat driversClassic Laravel line logs and JSON logs behind one interfaceOperational UIError trends, severity health, pattern discovery, and whole-file searchesFamiliar managementDate and level filters, downloads, opt-in deletion, localization, and API accessRequirements
------------

[](#requirements)

- PHP `7.3` or newer
- Laravel `8.x` or newer
- JSON extension
- A writable index location when streaming is enabled

> The dependency matrix is intentionally broad. Validate your exact PHP/Laravel combination in CI before a production upgrade.

Quick start
-----------

[](#quick-start)

```
composer require iyogesharma/log-viewer:^2.1
```

Installing straight from GitHub insteadAdd the repository to your application's `composer.json`, then require the package as usual:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url":  "https://github.com/iYogesharma/logviewer-laravel"
        }
    ]
}
```

```
composer require iyogesharma/log-viewer:^2.0
```

Publish configuration when you need to customize storage, streaming, routes, or themes:

```
php artisan vendor:publish --provider="Arcanedev\LogViewer\LogViewerServiceProvider"
```

Open the viewer at:

```
/log-viewer

```

The default remains `bootstrap-5`, so upgrading does not silently switch the interface.

Themes
------

[](#themes)

Version 2 includes two self-contained themes. Both support automatic, light, and dark color modes and require no npm installation or asset compilation.

```
// config/log-viewer.php
'theme' => 'observatory', // or 'console'
```

ObservatoryConsoleBest forSupport and operations teamsDevelopers and message-first debuggingDashboardError trends, risk signals, severity health, highest-risk filesCompact level distributionLog filesNon-scrolling investigation listDense level-count gridInvestigationDynamic dimensions and whole-file pattern searchesServer search and visible-page filteringDetailsConditional stack/context expansionConditional stack/context expansionCopy toolsSummaries, visible entries, complete entriesContext and entry copy actions### Observatory

[](#observatory)

The Observatory theme turns indexed counts into support-oriented signals ([dashboard screenshot above](#logviewer-for-laravel)):

- High-severity movement across indexed dates
- Peak-volume and highest-risk files
- Hourly high-severity activity for the current result set
- Dynamically discovered URLs, routes, processes, channels, model IDs, classes, services, and JSON fields
- Whole-file server searches that remain active across pagination
- Strict analysis budgets so UI discovery never becomes a second log parser

Pattern suggestions are sampled from the current page, but selecting one searches the complete selected log.

[![Observatory log page — severity KPIs, discovered dimensions, hourly high-severity activity, and the entry list](_screenshots/observatory-log-page.png)](_screenshots/observatory-log-page.png)

### Console

[](#console)

The Console theme keeps the interface dense and direct:

- Whole-file search and level filters
- Date switching and visible-page filtering
- Message-first log rows
- Conditional stack and context details
- Download, opt-in delete, copy, and pagination controls

[![Console log page — terminal-style severity and dimension filters beside a dense, message-first entry list](_screenshots/console-log-page.png)](_screenshots/console-log-page.png)

[![Console dashboard in light mode — entry totals, errors over time, and level distribution](_screenshots/console-dashboard.png)](_screenshots/console-dashboard.png)

Both themes apply the saved color mode before first paint to prevent light/dark flicker during navigation — the Console screenshots above show the same theme in dark and light modes.

Large-file streaming
--------------------

[](#large-file-streaming)

Streaming is enabled by default for files above the inline threshold:

```
// config/log-viewer.php
'streaming' => [
    'enabled'               => true,
    'max-inline-bytes'      => 2 * 1024 * 1024,  // 2 MB
    'index-path'            => null,              // beside logs by default
    'tail-bytes'            => 25 * 1024 * 1024, // bounded cold-file fallback
    'max-build-concurrency' => 2,
],
```

 ```
flowchart LR
    A["Viewer request"] --> B{"File size"}
    B -->|"≤ inline threshold"| C["Classic reader"]
    B -->|"> inline threshold"| D{"Valid index?"}
    D -->|"Yes"| E["Read requested page"]
    D -->|"No"| F["Serve bounded tail"]
    F --> G["Build or extend index"]
    G --> E
```

      Loading ### Warm indexes during deployment

[](#warm-indexes-during-deployment)

```
php artisan log-viewer:index
```

Index one date:

```
php artisan log-viewer:index 2026-07-23
```

When logs live on a read-only or shared mount, configure a dedicated writable directory:

```
'index-path' => storage_path('framework/log-viewer-indexes'),
```

Indexes are disposable caches. Source log files remain authoritative.

Bounded UI analytics
--------------------

[](#bounded-ui-analytics)

Dynamic pattern discovery intentionally has hard limits:

- Current paginator page only
- At most 75 entries inspected
- Approximately 512 KB total analysis budget
- Capped header, context, and stack samples
- Capped dimension and value cardinality
- No full-file traversal from Blade

The interface shows the number of entries and bytes sampled. Applying a suggested value uses the normal server search route across the complete file.

Log formats
-----------

[](#log-formats)

The streaming registry supports:

- Classic Laravel/Monolog line logs
- JSON log records

Pattern discovery does not require JSON. It can infer useful values from route-like text, labeled fields, environments, messages, classes, services, and optional context data.

Custom formats can be added through the format-driver contract. Test representative production logs before enabling streaming globally.

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

[](#configuration)

The main options live in [`config/log-viewer.php`](config/log-viewer.php):

- Log storage path and filename pattern
- Locale
- Theme
- Route prefix and middleware
- Entries per page
- Formatter/driver
- Streaming threshold and index location
- Tail fallback and build concurrency
- Download and menu behavior
- Delete controls (`observatory` and `console` themes), disabled by default

### Delete controls

[](#delete-controls)

Log deletion is destructive and irreversible, so the delete buttons in the two v2 themes are **hidden by default**:

```
'delete' => false,
```

Set it to `true` — or bind it to an environment variable — to show them:

```
'delete' => (bool) env('LOG_VIEWER_ALLOW_DELETE', false),
```

This flag controls the UI of the `observatory` and `console` themes only. The `log-viewer::logs.delete` route stays registered, because the bootstrap themes still use it; apply route middleware if deletion must be forbidden outright.

Detailed package documentation remains available in:

1. [Installation and setup](_docs/1.Installation-and-Setup.md)
2. [Configuration](_docs/2.Configuration.md)
3. [Usage](_docs/3.Usage.md)
4. [Upgrading from 1.2.x](UPGRADE.md)

Migrating from `arcanedev/log-viewer`
-------------------------------------

[](#migrating-from-arcanedevlog-viewer)

The namespace, facade, configuration keys, route names, views and published assets are unchanged, so switching packages is a Composer operation:

```
composer remove arcanedev/log-viewer
composer require iyogesharma/log-viewer:^2.0
```

Your existing `config/log-viewer.php` keeps working — merge the new `streaming` and `delete` keys when convenient. Existing `Arcanedev\LogViewer\` imports, `LogViewer::` facade calls and `log-viewer::` route names need no edits.

The one code change to check for: if your application implements the `Arcanedev\LogViewer\Contracts\LogViewer` contract itself, add the new `logForViewer($date)` method. See the [upgrade guide](UPGRADE.md).

Upgrading to v2
---------------

[](#upgrading-to-v2)

Version 2 contains public-contract and runtime changes. Before deployment:

1. Merge the new configuration.
2. Update custom `LogViewer` contract implementations with `logForViewer($date)`.
3. Prepare a writable index directory.
4. Test representative line and JSON logs.
5. Warm large indexes if first-request latency matters.

See the complete [upgrade guide](UPGRADE.md), including opt-out and rollback instructions.

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

The suite covers classic behavior, streaming indexes, format handling, PCRE safety, and real-route rendering for both modern themes.

Localization
------------

[](#localization)

The package includes translations for Arabic, Bengali, Bulgarian, Chinese, Dutch, English, Estonian, French, German, Hungarian, Indonesian, Italian, Japanese, Korean, Malay, Persian, Polish, Portuguese, Romanian, Russian, Sinhala, Spanish, Swedish, Thai, Turkish, Ukrainian, and Uzbek.

Legacy Bootstrap preview
------------------------

[](#legacy-bootstrap-preview)

Show the inherited Bootstrap interface[![Bootstrap dashboard](_screenshots/1-dashboard.jpg)](_screenshots/1-dashboard.jpg)[![Bootstrap logs list](_screenshots/2-logs-list.jpg)](_screenshots/2-logs-list.jpg)[![Bootstrap single log](_screenshots/3-single-log.jpg)](_screenshots/3-single-log.jpg)

Security
--------

[](#security)

Please do not report security vulnerabilities through public issues. Contact the repository maintainer privately with reproduction details and affected versions.

Credits
-------

[](#credits)

This fork builds on the original [ARCANEDEV LogViewer](https://github.com/ARCANEDEV/LogViewer) project and its contributors, and remains MIT licensed.

- [ARCANEDEV](https://github.com/arcanedev-maroc) — original author
- [Yogesh Sharma](https://github.com/iYogesharma) — fork maintainer
- [All contributors](https://github.com/iYogesharma/logviewer-laravel/graphs/contributors)

License
-------

[](#license)

Released under the [MIT License](LICENSE.md).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.1% 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 ~90 days

Recently: every ~141 days

Total

10

Last Release

17d ago

Major Versions

v1.2.3 → v2.12026-07-27

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44565761?v=4)[Yogesh Sharma](/maintainers/iYogesharma)[@iYogesharma](https://github.com/iYogesharma)

---

Top Contributors

[![arcanedev-maroc](https://avatars.githubusercontent.com/u/3282340?v=4)](https://github.com/arcanedev-maroc "arcanedev-maroc (604 commits)")[![iYogesharma](https://avatars.githubusercontent.com/u/44565761?v=4)](https://github.com/iYogesharma "iYogesharma (13 commits)")[![derekphilipau](https://avatars.githubusercontent.com/u/22045002?v=4)](https://github.com/derekphilipau "derekphilipau (10 commits)")[![vjandrea](https://avatars.githubusercontent.com/u/1639757?v=4)](https://github.com/vjandrea "vjandrea (5 commits)")[![Schnoop](https://avatars.githubusercontent.com/u/1263407?v=4)](https://github.com/Schnoop "Schnoop (4 commits)")[![bobbybouwmann](https://avatars.githubusercontent.com/u/5872362?v=4)](https://github.com/bobbybouwmann "bobbybouwmann (3 commits)")[![VahanMargaryan](https://avatars.githubusercontent.com/u/176320?v=4)](https://github.com/VahanMargaryan "VahanMargaryan (3 commits)")[![zorn-v](https://avatars.githubusercontent.com/u/12619075?v=4)](https://github.com/zorn-v "zorn-v (3 commits)")[![blomdahldaniel](https://avatars.githubusercontent.com/u/10044093?v=4)](https://github.com/blomdahldaniel "blomdahldaniel (3 commits)")[![arrowrowe](https://avatars.githubusercontent.com/u/4508882?v=4)](https://github.com/arrowrowe "arrowrowe (2 commits)")[![vongola12324](https://avatars.githubusercontent.com/u/5770715?v=4)](https://github.com/vongola12324 "vongola12324 (2 commits)")[![mlanin](https://avatars.githubusercontent.com/u/467159?v=4)](https://github.com/mlanin "mlanin (2 commits)")[![jcornil](https://avatars.githubusercontent.com/u/157859?v=4)](https://github.com/jcornil "jcornil (2 commits)")[![jenky](https://avatars.githubusercontent.com/u/1808758?v=4)](https://github.com/jenky "jenky (2 commits)")[![limatheus](https://avatars.githubusercontent.com/u/5197254?v=4)](https://github.com/limatheus "limatheus (2 commits)")[![tabacitu](https://avatars.githubusercontent.com/u/1032474?v=4)](https://github.com/tabacitu "tabacitu (2 commits)")[![tianissimo](https://avatars.githubusercontent.com/u/699569?v=4)](https://github.com/tianissimo "tianissimo (2 commits)")[![nazirov-dev](https://avatars.githubusercontent.com/u/91299565?v=4)](https://github.com/nazirov-dev "nazirov-dev (2 commits)")[![mikimaine](https://avatars.githubusercontent.com/u/10907808?v=4)](https://github.com/mikimaine "mikimaine (1 commits)")[![akbarali1](https://avatars.githubusercontent.com/u/39323182?v=4)](https://github.com/akbarali1 "akbarali1 (1 commits)")

---

Tags

loglaravelstreaminglog viewerarcanedevlogviewerlarge files

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[arcanedev/log-viewer

Provides a Log Viewer for Laravel

2.4k7.0M54](/packages/arcanedev-log-viewer)

PHPackages © 2026

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