PHPackages                             corrivate/magento2-rest-api-logger - 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. corrivate/magento2-rest-api-logger

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

corrivate/magento2-rest-api-logger
==================================

Advanced and convenient logging

1.3.0(1y ago)2146.2k↓14.5%1[2 issues](https://github.com/LBannenberg/magento2-rest-api-logger/issues)1MITPHPPHP ~7.4.0||~8.0.0||~8.1.0||~8.2.0||~8.3.0||~8.4.0

Since Jan 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/LBannenberg/magento2-rest-api-logger)[ Packagist](https://packagist.org/packages/corrivate/magento2-rest-api-logger)[ RSS](/packages/corrivate-magento2-rest-api-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (18)Used By (1)

Corrivate\_RestApiLogger
========================

[](#corrivate_restapilogger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f16c341800b7293304c12547d5856f2587cfe64e86a6fccbcfe1b8e2a77720ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f727269766174652f6d6167656e746f322d726573742d6170692d6c6f676765723f636f6c6f723d626c7565)](https://packagist.org/packages/corrivate/magento2-rest-api-logger)[![MIT Licensed](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)

Goal
----

[](#goal)

Get logging visibility on the use of the Magento REST API:

- Which requests are made, by which IP &amp; user agent, to what endpoints?
- What is in those requests?
- What are they getting as responses?

At HYPR we've found this to be quite useful, because you often run into questions such as:

- Which external integration interacted with this product's data?
- The third party warehouse claims to have set product qty to X, but it's showing as Y. Have they really set it to X?
- Product image roles are configured strangely. Has someone used the wrong store code when updating them through the API?

IMPORTANT!
----------

[](#important)

Improper use of logging can expose security- and personally-sensitive data.

This module is a "power tool" for debugging API issues, it is not entirely possible to prevent this. Being careful what you log is YOUR responsibility. Setting this module to "always on" is not a good idea.

The module has several filters that allow you to narrow down the scope of what you're logging.

Installation
------------

[](#installation)

```
composer require corrivate/magento2-rest-api-logger
bin/magento module:enable Corrivate_RestApiLogger
bin/magento setup:di:compile
```

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

[](#configuration)

Most of this module's power is in the configuration. That's where you decide what kind of requests you want to log.

You can configure the logger in Admin &gt; Stores &gt; Configuration &gt; Services &gt; REST API Logger.

The following configurations are available:

- Enable/Disable logging
- Enable/Disable safer mode (which censors some privacy-sensitive payloads)
- Include request/response headers
- Setting up filters

### Configure what to filter on

[](#configure-what-to-filter-on)

- HTTP method (GET, POST, PUT, DELETE)
- API endpoint ()
- Route: can be used for query string arguments, or if you want all endpoints relating to products for example
- Requester's IP address
- Requester's user agent
- Text in the request body
- HTTP status of the response
- Text in the response body

### Configure consequences when a filter matches

[](#configure-consequences-when-a-filter-matches)

- **Forbid** logging this request/response/both. If this filter matches it overrules all other filters.
- **Require** that this specific filter matches, otherwise don't log the request/response/both. If "require" filters are specified, **all** of them need to match to log this.
- **Allow** logging this if the filter matches. If any "allow" filters are configured, at least **one** of them has to match, but not all of them.
- **Censor** the body of the request/response/both, but log that it took place and information about who sent it, response codes etc.
- Whenever a filter matches you can also add **tags**. This is useful for example to tag all requests coming from a particular IP address so that you know it came from company X. They could also be used for later post-processing of the logs.

Security
--------

[](#security)

The module will not log the body of incoming auth requests. If headers are logged, credentials will be hashed.

When "safer mode" is active in the configuration, the following additional filters are applied to reduce the risk of logging sensitive data:

- Header logging is disabled.
- request body contains "street" =&gt; censor both
- response body contains "street" =&gt; censor response
- Request URLs containing these parts =&gt; censor both
    - /V1/applepay
    - /V1/braintree
    - /V1/carts
    - /V1/creditmemo
    - /V1/customers
    - /V1/guest-carts
    - /V1/inventory/get-latlng-from-address
    - /V1/inventory/get-latslngs-from-address
    - /V1/invoices
    - /V1/orders
    - /V1/shipment
    - /V1/tfa

Credits
-------

[](#credits)

[![HYPR](docs/HYPER.jpg)](docs/HYPER.jpg)

This module was originally created at HYPER. With their permission it has been open-sourced and been developed further.

The design of the module builds on previous loggers, in particular  ; however, that module appears to be no longer actively supported.

Corrivate
---------

[](#corrivate)

(en.wiktionary.org)

Etymology

From Latin *corrivatus*, past participle of *corrivare* ("to corrivate").

### Verb

[](#verb)

**corrivate** (*third-person singular simple present* **corrivates**, *present participle* **corrivating**, *simple past and past participle* **corrivated**)

(*obsolete*) To cause to flow together, as water drawn from several streams.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance47

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Recently: every ~98 days

Total

17

Last Release

370d ago

Major Versions

v0.7.1 → v1.0.02024-04-15

PHP version history (4 changes)0.1.0PHP ~7.4.0||~8.1.0||~8.2.0

v0.4.0PHP ~7.4.0||~8.1.0||~8.2.0||~8.2.0

v1.0.0PHP ~7.4.0||~8.0.0||~8.1.0||~8.2.0||~8.3.0

v1.2.0PHP ~7.4.0||~8.0.0||~8.1.0||~8.2.0||~8.3.0||~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7edf7174a0f8c04f78fd1839a3d3312fd9994b09d619fb0a9cca87bab1265e9f?d=identicon)[Lau Bannenberg](/maintainers/Lau%20Bannenberg)

---

Top Contributors

[![LBannenberg](https://avatars.githubusercontent.com/u/53971840?v=4)](https://github.com/LBannenberg "LBannenberg (84 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/corrivate-magento2-rest-api-logger/health.svg)

```
[![Health](https://phpackages.com/badges/corrivate-magento2-rest-api-logger/health.svg)](https://phpackages.com/packages/corrivate-magento2-rest-api-logger)
```

###  Alternatives

[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[lizardmedia/module-varnish-warmer

Varnish Cache Warmer Magento2 module by Lizard Media

6276.8k](/packages/lizardmedia-module-varnish-warmer)[fredden/magento2-module-javascript-error-reporting

A Magento 2 module which captures JavaScript errors for later review by website administrators

3138.1k](/packages/fredden-magento2-module-javascript-error-reporting)[mage-os/module-admin-activity-log

The Admin Activity extension makes it easy to track all admin activity with comprehensive audit logging.

261.4k](/packages/mage-os-module-admin-activity-log)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

2382.6k](/packages/graycore-magento2-stdlogging)

PHPackages © 2026

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