# rjds/magento2-module-log-viewer

> Magento 2 backend log viewer module.

`composer require rjds/magento2-module-log-viewer`

Canonical URL: https://packagento.com/rjds/magento2-module-log-viewer

## At a glance

- **Vendor**: rjds (https://packagento.com/rjds.md)
- **Latest version**: 1.1.0 — released 2026-05-05
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/rjds/magento2-module-log-viewer and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require rjds/magento2-module-log-viewer:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 backend log viewer module.

## README

[![Version](https://img.shields.io/packagist/v/rjds/magento2-module-log-viewer.svg)](https://packagist.org/packages/rjds/magento2-module-log-viewer)
[![Downloads](https://img.shields.io/packagist/dt/rjds/magento2-module-log-viewer.svg)](https://packagist.org/packages/rjds/magento2-module-log-viewer)
[![License](https://img.shields.io/packagist/l/rjds/magento2-module-log-viewer.svg)](LICENSE)

A Magento 2 module to view and manage log files directly from the admin panel.

### Installation

Install from Packagist:

```bash
composer require rjds/magento2-module-log-viewer
bin/magento module:enable Rjds_LogViewer
bin/magento setup:upgrade
bin/magento cache:flush
```

### Overview

View Magento logs from the backend without SSH or filesystem access.
The module provides an admin interface to:

- list available log files
- inspect log contents
- filter and search entries
- safely clear log files when needed

### Quick Start

1. Go to **Magento Admin**.
2. Navigate to **Reports > Log Viewer > View Logs**.
3. Select a log file (for example `system.log`, `exception.log`, or `debug.log`).
4. Review entries and apply filters/search as needed.

### Screenshots

#### View Logs

![View Logs grid](docs/screenshots/view-logs-grid.png)

#### View Log

![View Log detail](docs/screenshots/view-log-detail.png)

#### Configure permissions

Grant access to the Log Viewer in **System > Permissions > User Roles**.

Make sure administrators who need this feature have the appropriate ACL resource enabled.

### Development

```bash
composer install
```

For local development in Magento:

```bash
bin/magento setup:upgrade
bin/magento cache:flush
```

Run your project quality checks (PHPStan, PHPCS, PHPUnit, etc.) according to your repository setup.

### Contributing

Contributions are welcome. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for contribution guidelines, commit conventions, and pull request workflow.

### Migrations

If future major versions introduce breaking changes, migration notes will be documented in `MIGRATION.md`.

### License

This project is released under the MIT License.
See `LICENSE` for details and `CHANGELOG.md` for release history.

## Changelog

### [1.1.0](https://github.com/RubenJ01/magento2-module-log-viewer/compare/v1.0.1...v1.1.0) (2026-05-04)


#### Features

* added a setting to disable the deletion of log files ([#20](https://github.com/RubenJ01/magento2-module-log-viewer/issues/20)) ([b6a66d0](https://github.com/RubenJ01/magento2-module-log-viewer/commit/b6a66d02f6e1c261e22fb42b6f1e0f690c8a47bd))

### [1.0.1](https://github.com/RubenJ01/magento2-module-log-viewer/compare/v1.0.0...v1.0.1) (2026-04-29)


#### Bug Fixes

* **registration:** include php-humanize in Magento DI compilation ([#18](https://github.com/RubenJ01/magento2-module-log-viewer/issues/18)) ([665dc89](https://github.com/RubenJ01/magento2-module-log-viewer/commit/665dc89ddb89bc01dbe277e6f455ea50d1a9398d))

### 1.0.0 (2026-04-24)


#### Features

* add store configuration section ([#6](https://github.com/RubenJ01/magento2-module-log-viewer/issues/6)) ([352ea27](https://github.com/RubenJ01/magento2-module-log-viewer/commit/352ea27ea45ea44da4e9183f88b07ac346d15a91))
* **delete:** added actions to delete logs ([#13](https://github.com/RubenJ01/magento2-module-log-viewer/issues/13)) ([c15472a](https://github.com/RubenJ01/magento2-module-log-viewer/commit/c15472a43852f714a0db607bd2c84bb76e0af203))
* implemented the actions to download logs ([#7](https://github.com/RubenJ01/magento2-module-log-viewer/issues/7)) ([de4e16d](https://github.com/RubenJ01/magento2-module-log-viewer/commit/de4e16d3eee6493c89fb842a4a52eda868dc837d))
* initial commit ([40d9cd5](https://github.com/RubenJ01/magento2-module-log-viewer/commit/40d9cd5b70ba6b971cb357710ca421562f8b4e94))
* **log:** added a ui component to display all logs ([#5](https://github.com/RubenJ01/magento2-module-log-viewer/issues/5)) ([d24b55f](https://github.com/RubenJ01/magento2-module-log-viewer/commit/d24b55fc19e1ce05852c0aa0a40b51a9713f95a6))
* **view:** logs UI ([#15](https://github.com/RubenJ01/magento2-module-log-viewer/issues/15)) ([6f38a64](https://github.com/RubenJ01/magento2-module-log-viewer/commit/6f38a64403a5512f9b8be6b3a919269dc29ca38e))

## Recent Versions

| Version | Released |
|---|---|
| 1.1.0 | 2026-05-05 |
| 1.0.1 | 2026-04-29 |
| 1.0.0 | 2026-04-24 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| ext-zip | * |
| rjds/php-humanize | ^3.0 |

## Quality

Latest release (1.1.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 229 | 11 errors, 218 warnings (ruleset: Magento2) — 183 auto-fixable with phpcbf |
| PHPMD | Warning | 3 | 3 rule violations (ErrorControlOperator:2, UnusedFormalParameter:1) |
| Cpd | Pass | 0 |  |
| PHP Compatibility | Pending | 0 |  |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 4 | 4 | – | – |
| 2.4.8 | – | 4 | 4 | – |
| 2.4.9 | – | – | 4 | 4 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | not tested | – |
| 2.4.9 | – | – | Pass | not tested |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["rjds/magento2-module-log-viewer"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

rjds is a Magento 2 vendor on Packagento. See https://packagento.com/rjds.md for their full catalogue.

