# opengento/module-webapi-logger

> This module allows you to analyze all the webapi rest done call toward your Magento.

`composer require opengento/module-webapi-logger`

Canonical URL: https://packagento.com/opengento/module-webapi-logger

## At a glance

- **Vendor**: opengento (https://packagento.com/opengento.md)
- **Latest version**: 5.0.0 — released 2026-02-16
- **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/opengento/module-webapi-logger 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 opengento/module-webapi-logger:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

This module allows you to analyze all the webapi rest done call toward your Magento.

## README

[![Latest Stable Version](https://img.shields.io/packagist/v/opengento/module-webapi-logger.svg?style=flat-square)](https://packagist.org/packages/opengento/module-webapi-logger)
[![License: MIT](https://img.shields.io/github/license/opengento/magento2-webapi-logger.svg?style=flat-square)](./LICENSE)
[![Packagist](https://img.shields.io/packagist/dt/opengento/module-webapi-logger.svg?style=flat-square)](https://packagist.org/packages/opengento/module-webapi-logger/stats)
[![Packagist](https://img.shields.io/packagist/dm/opengento/module-webapi-logger.svg?style=flat-square)](https://packagist.org/packages/opengento/module-webapi-logger/stats)

This module allows you to analyze all the webapi rest done call toward your Magento.

- [Fork](#fork)
- [Setup](#setup)
    - [Composer installation](#composer-installation)
    - [Setup the module](#setup-the-module)
- [Features](#features)
- [Settings](#settings)
- [Documentation](#documentation)
- [Support](#support)
- [Authors](#authors)
- [License](#license)

### Fork

This is a forked version from the following repository: https://github.com/ghostunicorns/module-webapi-logs.  
It also contains changes from the following fork: https://github.com/magentix/module-webapi-logs.

As the original repository does not seems to be maintained anymore, we offer an improved and optimized version here.

### Setup

Magento 2 Open Source or Commerce edition is required.

####  Composer installation

Run the following composer command:

```
composer require opengento/module-webapi-logger
```

#### Setup the module

Run the following magento command:

```
bin/magento setup:upgrade
```

**If you are in production mode, do not forget to recompile and redeploy the static resources.**

### Features

### Settings

The configuration for this module is available in `Stores > Configuration > System > Webapi Logs`.

<img src="https://github.com/opengento/magento2-webapi-logger/blob/main/screenshots/screen1.png" />

### Documentation

Go to `Reports > Webapi Logs > Show Logs`

<img src="https://github.com/opengento/magento2-webapi-logger/blob/main/screenshots/screen2.png" />

You can select an entry to see more details about the request and the response

<img src="https://github.com/opengento/magento2-webapi-logger/blob/main/screenshots/screen3.png" />

If you disable the Secret Mode this module will logs everything passes in the webapi calls (tokens and passwords too!), then remember to clean logs by clicking the `Delete All Logs` button:

<img src="https://github.com/opengento/magento2-webapi-logger/blob/main/screenshots/screen4.png" />

It is now possible to log the webapi request and response to filesystem or any handler that follow the PSR Log.  
You can register your handlers to `Opengento\WebapiLogger\Logger`. The module use the `debug` level to log the request and response.

### Support

Raise a new [request](https://github.com/opengento/magento2-webapi-logger/issues) to the issue tracker.

### Authors

- **GhostUnicorns** - *Original Work* - [www.ghostunicorns.com](https://www.ghostunicorns.com/)
- **Contributors** - *Contributor* - [![GitHub contributors](https://img.shields.io/github/contributors/opengento/magento2-webapi-logger.svg?style=flat-square)](https://github.com/opengento/magento2-webapi-logger/graphs/contributors)
- **Opengento Community** - *Maintainer* - [![Twitter Follow](https://img.shields.io/twitter/follow/opengento.svg?style=social)](https://twitter.com/opengento)

### License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) details.

***That's all folks!***

## Recent Versions

| Version | Released |
|---|---|
| 5.0.0 | 2026-02-16 |
| 4.2.0 | 2026-02-15 |
| 4.1.0 | 2025-08-12 |
| 4.0.1 | 2024-09-05 |
| 4.0.0 | 2024-07-22 |
| 3.0.1 | 2024-03-21 |
| 3.0.0 | 2024-02-26 |
| 2.0.2 | 2023-12-06 |
| 2.0.1 | 2023-11-29 |
| 2.0.0 | 2023-11-23 |

Showing 10 of 11 versions. Full release history on https://packagento.com/opengento/module-webapi-logger.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | * |
| magento/module-webapi | * |
| php | ^8.1 |
| psr/log | * |

### Require (dev)

| Package | Constraint |
|---|---|
| magento/magento-coding-standard | ^5 |
| magento/marketplace-eqp | ^4.0 |
| roave/security-advisories | dev-latest |

### Suggest

| Package | Constraint |
|---|---|
| opengento/logger | This module will sets a new Gelf logger handler for Magento2. |

## Quality

Latest release (5.0.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 | 44 | 1 error, 43 warnings (ruleset: Magento2) — 22 auto-fixable with phpcbf |
| PHPMD | Warning | 4 | 4 rule violations (UnusedFormalParameter:4) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 3 | valid; 3 advisory notes (composer validate --strict) |

#### 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 | 13 | 13 | – | – |
| 2.4.8 | – | 13 | 13 | – |
| 2.4.9 | – | – | 13 | 13 |


### 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 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

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

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | N/A | 0 | no resolvable dependency tree to audit — Your requirements could not be resolved to an installable set of packages. Problem 1 |
| 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=["opengento/module-webapi-logger"],
  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

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

