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

ActiveMagento2-module[Logging &amp; Monitoring](/categories/logging)

mageprince/module-log-viewer
============================

Magento 2 Log Viewer Extension

1.0.9(1mo ago)4525.3k↓49.8%12[1 issues](https://github.com/mageprince/magento2-logviewer/issues)GPL-3.0-or-laterPHP

Since Jul 18Pushed 1mo agoCompare

[ Source](https://github.com/mageprince/magento2-logviewer)[ Packagist](https://packagist.org/packages/mageprince/module-log-viewer)[ RSS](/packages/mageprince-module-log-viewer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)DependenciesVersions (19)Used By (0)

Magento 2 Log Viewer
====================

[](#magento-2-log-viewer)

Mageprince Log Viewer is a powerful admin utility that allows you to manage, monitor, and debug log files directly from the Magento Admin Panel — without needing to access the server or filesystem.

✅ Compatibility
===============

[](#-compatibility)

**Magento Open Source:** 2.3.x - 2.4.x

✨ Key Features
==============

[](#-key-features)

### Log File List

[](#log-file-list)

- Browse all log files in `var/log/` directly from the admin panel
- Search log files by filename
- Sort by filename, file size, or last modified time
- Pagination support for large log directories

### Log Viewer

[](#log-viewer)

- View the latest log lines with configurable line count
- **Load Previous Logs** — paginate backwards through the file without loading it all at once
- **Live Log** — auto-refreshes every 3 seconds to tail new entries in real time
- **Wrap Lines** toggle for better readability of long lines
- **Clear Log** — clears the current view without affecting the file on disk

### Full-File Search

[](#full-file-search)

- Search across the **entire log file**, not just the visible lines — works on files of any size (including multi-GB logs)
- Returns the last 20 matching lines; click **Load Previous Logs** to page through earlier results

### File Operations

[](#file-operations)

- **Download** log files directly from the admin
- **Truncate** (clear file content) with confirmation prompt
- Role-based access control — download and delete can be independently restricted per admin role

### ⚙️ Admin Configuration (`Stores → Configuration → MagePrince → Log Viewer`)

[](#️-admin-configuration-stores--configuration--mageprince--log-viewer)

SettingDescriptionEnableToggle the entire module on or offLines to ShowNumber of lines tailed per view (default 500)Items Per PageLog file list page size (default 10)Default Sort Column`name`, `size`, or `mod_time`Default Sort Direction`asc` or `desc`Allow DeleteShow or hide the Truncate buttonAllow DownloadEnable or disable file download### 🔒 Security

[](#-security)

- Path traversal prevention — all file access is validated against `var/log/` using real path resolution
- Search query sanitisation — null bytes and control characters stripped before regex matching
- Role-based ACL with four granular resources: View, Download, Delete, Settings

🚀 Installation Instructions
===========================

[](#-installation-instructions)

### 1. Install via Composer (Recommended)

[](#1-install-via-composer-recommended)

```
composer require mageprince/module-log-viewer
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
```

### 2. Manual Installation

[](#2-manual-installation)

Copy the contents of this repository to `app/code/Mageprince/LogViewer`, then run:

```
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
```

🤝 Contribution
==============

[](#-contribution)

Want to contribute to this extension? The quickest way is to [open a pull request](https://help.github.com/articles/about-pull-requests/) on GitHub.

🛠 Support
=========

[](#-support)

If you encounter any problems or bugs, please [open an issue](https://github.com/mageprince/magento2-logviewer/issues) on GitHub.

📸 Screenshots
=============

[](#-screenshots)

[![image](https://private-user-images.githubusercontent.com/24751863/600489245-af38b037-7841-48dd-9830-6d9030cfc0ba.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4NDE5MTgsIm5iZiI6MTc4Mjg0MTYxOCwicGF0aCI6Ii8yNDc1MTg2My82MDA0ODkyNDUtYWYzOGIwMzctNzg0MS00OGRkLTk4MzAtNmQ5MDMwY2ZjMGJhLnBuZz9YLUFtei1Bb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NiMGZlMDI4ZDU5YzcwMzEzZmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.d_TD0vZj2ZWhKevql1Tql5khfVR1tuJ_7d26te_fsOE)[![image](https://private-user-images.githubusercontent.com/24751863/600488083-d9ed8946-e27d-46a9-b808-1ff90c3e718e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4NDE5MTgsIm5iZiI6MTc4Mjg0MTYxOCwicGF0aCI6Ii8yNDc1MTg2My82MDA0ODgwODMtZDllZDg5NDYtZTI3ZC00NmE5LWI4MDgtMWZmOTBjM2U3MThlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjMwVDE3NDY1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2NWUyNWJhN2JkYmYyZTYxYjE2YjljNWE5ZDhjM2JlMDc4NmFlZGI0YmY0NjNiOWU1MWZmMmM3M2YyYmJmYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.jpBW99bf8F6jcFlZlIGq7vjtVTUVZYnqIzKgX2o_dUo)](https://private-user-images.githubusercontent.com/24751863/600488083-d9ed8946-e27d-46a9-b808-1ff90c3e718e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4NDE5MTgsIm5iZiI6MTc4Mjg0MTYxOCwicGF0aCI6Ii8yNDc1MTg2My82MDA0ODgwODMtZDllZDg5NDYtZTI3ZC00NmE5LWI4MDgtMWZmOTBjM2U3MThlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjMwVDE3NDY1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2NWUyNWJhN2JkYmYyZTYxYjE2YjljNWE5ZDhjM2JlMDc4NmFlZGI0YmY0NjNiOWU1MWZmMmM3M2YyYmJmYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.jpBW99bf8F6jcFlZlIGq7vjtVTUVZYnqIzKgX2o_dUo)

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance93

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community10

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

Every ~35 days

Recently: every ~62 days

Total

10

Last Release

34d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24751863?v=4)[Mageprince](/maintainers/mageprince)[@mageprince](https://github.com/mageprince)

---

Top Contributors

[![mageprince](https://avatars.githubusercontent.com/u/24751863?v=4)](https://github.com/mageprince "mageprince (31 commits)")

---

Tags

adobe-commercefree-extensionlogviewlogviewermagento-free-extensionmagento2magento2-extensionmagento2-modulemagento2-module-freemagento2-pluginmageprince-logviewer

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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