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

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

shaonmajumder/log-viewer
========================

Reusable Laravel log viewer package with filtering, context expansion, and download support.

v0.0.29(1mo ago)188MITBladePHP ^8.0

Since Sep 23Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ShaonMajumder/log-viewer)[ Packagist](https://packagist.org/packages/shaonmajumder/log-viewer)[ RSS](/packages/shaonmajumder-log-viewer/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (31)Used By (0)

🚀 Laravel Log Viewer
====================

[](#-laravel-log-viewer)

 [![](https://camo.githubusercontent.com/3da17bb2396669c865ced77aac9155cb24979c7110f62287fa6a47f5fef8e29d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d39253230253743253230313025323025374325323031312d7265643f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c)](https://camo.githubusercontent.com/3da17bb2396669c865ced77aac9155cb24979c7110f62287fa6a47f5fef8e29d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d39253230253743253230313025323025374325323031312d7265643f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c) [![](https://camo.githubusercontent.com/096fb79afa2f5d77a2b8ef95956e34eda095e636fd5266fc314123fd97400233/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382532422d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://camo.githubusercontent.com/096fb79afa2f5d77a2b8ef95956e34eda095e636fd5266fc314123fd97400233/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382532422d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d706870) [![](https://camo.githubusercontent.com/153acf9dff19deb8abfc598c53bac50a4ceae0f5c83a552711060d3d78d2c057/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/153acf9dff19deb8abfc598c53bac50a4ceae0f5c83a552711060d3d78d2c057/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666f722d7468652d6261646765) [![](https://camo.githubusercontent.com/b475d749e002961410ff32b8c39b2ad01827b89b9c3102d5f8bb55aaac9af05c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f64756374696f6e2d52656164792d737563636573733f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/b475d749e002961410ff32b8c39b2ad01827b89b9c3102d5f8bb55aaac9af05c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f64756374696f6e2d52656164792d737563636573733f7374796c653d666f722d7468652d6261646765)

 🔥 Beautiful • Secure • Fast • Real-Time Friendly Laravel Log Viewer

---

✨ Features
==========

[](#-features)

🛡️ Security First
-----------------

[](#️-security-first)

- 🔐 Admin-protected routes
- 🚫 Path traversal protection
- 🧠 Custom authorization callback
- 🧱 Middleware configurable

---

📄 Smart Log Discovery
---------------------

[](#-smart-log-discovery)

Automatically detects:

- `laravel.log`
- `laravel-YYYY-MM-DD.log`
- rotated log files
- multiple Laravel log patterns

---

🎨 Beautiful Log Highlighting
----------------------------

[](#-beautiful-log-highlighting)

Color-coded levels:

LevelHighlight❌ ERRORRed⚠️ WARNINGYellowℹ️ INFOBlue🐛 DEBUGGray---

🌙 Theme Support
---------------

[](#-theme-support)

Built-in dark theme options:

- `Dark Ink` (default)
- `Dark Graphite`
- `Dark Forest`

Theme can be changed directly from the viewer header, and the selection is saved in browser `localStorage`.

---

🔍 Advanced Filtering
--------------------

[](#-advanced-filtering)

- 🔎 Full-text search
- 🎯 Level filtering
- 📌 Match-only mode
- ⚡ Instant filtering

---

🧠 Inline Context Expansion
--------------------------

[](#-inline-context-expansion)

Expand surrounding lines around matches:

- `No Context`
- `±2`
- `±5`
- `±10`
- `±20`

Perfect for debugging stack traces and exceptions.

---

⏱️ Tail Mode Support
--------------------

[](#️-tail-mode-support)

View latest logs instantly:

- No Limit
- 100
- 300
- 500
- 1000
- 2000

---

📥 Filtered Download
-------------------

[](#-filtered-download)

Download:

- full logs
- filtered results
- contextual output

---

🔄 Auto Refresh Controls
-----------------------

[](#-auto-refresh-controls)

- Live refresh
- Pause on scroll
- Smart refresh handling
- Developer-friendly UX

---

📦 Installation
==============

[](#-installation)

✅ Packagist (Recommended)
-------------------------

[](#-packagist-recommended)

```
composer require shaonmajumder/log-viewer
```

---

🧪 Local Development (Path Repository)
-------------------------------------

[](#-local-development-path-repository)

Add to your Laravel app:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "../log-viewer"
    }
  ],
  "require": {
    "shaonmajumder/log-viewer": "*@dev"
  }
}
```

Then run:

```
composer update shaonmajumder/log-viewer
```

---

⚙️ Publish Configuration
========================

[](#️-publish-configuration)

```
php artisan vendor:publish --tag=log-viewer-config
```

Publish views:

```
php artisan vendor:publish --tag=log-viewer-views
```

---

🌐 Default Routes
================

[](#-default-routes)

RouteDescription`/log-viewer`Main log viewer`/log-viewer/download`Download logs---

🔧 Configuration
===============

[](#-configuration)

Published config:

```
config/log-viewer.php
```

---

Important Options
-----------------

[](#important-options)

OptionDescription`route_prefix`Route prefix`middleware`Route middleware`layout`Blade layout`heading`Viewer heading---

🔒 Access Control
================

[](#-access-control)

Default behavior is fixed: only logged-in users can access `/log-viewer`.

- If user is not logged in, package redirects to `/login`.
- If user is logged in, package allows access.
- This access rule is enforced in package controller logic and does not depend on per-project auth config toggles.

---

🖼️ Screenshots
==============

[](#️-screenshots)

```
![Main Viewer](assets/screenshots/log-viewer-main.png)

![Context Expansion](assets/screenshots/log-viewer-context.png)

![Auto Refresh](assets/screenshots/log-viewer-refresh.png)
```

---

🧱 Package Structure
===================

[](#-package-structure)

```
src/
├── Http/
│   └── Controllers/
│       └── LaravelLogController.php
│
├── LaravelLogViewerServiceProvider.php

routes/
└── web.php

config/
└── log-viewer.php

resources/
└── views/
    └── index.blade.php

```

---

🛡️ Security Notes
=================

[](#️-security-notes)

> ⚠️ Never expose production logs publicly.

Recommended:

- protect with authentication
- enforce admin authorization
- restrict access internally only

---

🚀 Built For
===========

[](#-built-for)

✅ Production Laravel apps
✅ Admin panels
✅ DevOps dashboards
✅ Debugging tools
✅ Monitoring systems
✅ Internal engineering tools

---

❤️ Why This Package?
====================

[](#️-why-this-package)

Most Laravel log viewers are:

- outdated
- unsafe
- slow
- ugly
- missing filtering/context tools

This package focuses on:

✅ Developer Experience
✅ Security
✅ Performance
✅ Clean UI
✅ Real-world production usage

---

📌 Compatibility
===============

[](#-compatibility)

FrameworkSupportedLaravel 9✅Laravel 10✅Laravel 11✅PHP VersionSupportedPHP 8+✅---

📄 License
=========

[](#-license)

MIT © Shaon Majumder

---

⭐ Support The Project
=====================

[](#-support-the-project)

If this package helps you:

- ⭐ Star the repository
- 🍴 Fork it
- 🐛 Report issues
- 🚀 Contribute improvements

---

 Built with ❤️ for Laravel developers

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance89

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~34 days

Recently: every ~0 days

Total

29

Last Release

54d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10521774?v=4)[Shaon Majumder](/maintainers/shaonmajumder)[@ShaonMajumder](https://github.com/ShaonMajumder)

---

Top Contributors

[![ShaonMajumder](https://avatars.githubusercontent.com/u/10521774?v=4)](https://github.com/ShaonMajumder "ShaonMajumder (30 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

65108.9k](/packages/masterro-laravel-mail-viewer)

PHPackages © 2026

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