PHPackages                             emargareten/client-logger-laravel - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. emargareten/client-logger-laravel

ActiveLibrary[HTTP &amp; Networking](/categories/http)

emargareten/client-logger-laravel
=================================

Log HTTP client requests and responses in Laravel

v0.0.6(1mo ago)51.8k[1 PRs](https://github.com/emargareten/client-logger-laravel/pulls)MITPHPPHP ^8.2CI failing

Since Jan 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/emargareten/client-logger-laravel)[ Packagist](https://packagist.org/packages/emargareten/client-logger-laravel)[ Docs](https://github.com/emargareten/client-logger-laravel)[ RSS](/packages/emargareten-client-logger-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (16)Versions (8)Used By (0)

Client Logger for Laravel
=========================

[](#client-logger-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7a51db48cd5caa00d07a5601cc29366c74b976157b320131fafd2c177564a9fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d61726761726574656e2f636c69656e742d6c6f676765722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emargareten/client-logger-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/35615923e772f419b2dc2e07db10a97c0606795a9fa602c1cdbadfee31f68fdb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656d61726761726574656e2f636c69656e742d6c6f676765722d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/emargareten/client-logger-laravel/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2c195559eabd2dbfcdc8314a537085e25089242c70a60a5689528118a6965dbc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656d61726761726574656e2f636c69656e742d6c6f676765722d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/emargareten/client-logger-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/aa0f054db946d2fe271977e96a9c10f57e8e369640729f582409ea0d14aa3a64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d61726761726574656e2f636c69656e742d6c6f676765722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emargareten/client-logger-laravel)

The Client Logger is a Laravel package designed to log HTTP client requests and responses. It is user-friendly and offers a high degree of customization.

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

[](#installation)

To install the package, use composer:

```
composer require emargareten/client-logger-laravel
```

Usage
-----

[](#usage)

After installing the package, you may publish the configuration file with the following command (optional):

```
php artisan vendor:publish --provider="Emargareten\ClientLogger\ClientLoggerServiceProvider"
```

The package adds a `log` method to the `PendingRequest` class. This method can be used to log the request and response of an HTTP request:

```
use Illuminate\Support\Facades\Http;

$response = Http::log('Example message...')->get('https://example.com');
```

This will create a log entry with the following information (in the context):

- `method`: The HTTP method of the request.
- `uri`: The URI of the request.
- `headers`: The headers of the request.
- `payload`: The payload of the request.
- `response_status`: The status code of the response.
- `response_headers`: The headers of the response.
- `response`: The body of the response.

It is also possible to change the config for a given log by passing an array as the second argument:

```
Http::log('Example message...', [
    'hidden_request_headers' => ['x-api-key'],
])->get('https://example.com');
```

Here are some of the available config options:

- `channel`: The channel to use for the log.
- `level`: The level to use for the log (can be set separately for each status code or entirely disabled for a given status code).
- `hidden_request_headers`: An array of headers that should be masked in the log.
- `hidden_request_params`: An array of request parameters that should be masked in the log.
- `hidden_response_headers`: An array of headers that should be masked in the log.
- `hidden_response_params`: An array of response parameters that should be masked in the log.

Please see the [config file](config/client-logger.php) for all available options.

Testing
-------

[](#testing)

To run the tests, use the following command:

```
composer test
```

Code Analysis
-------------

[](#code-analysis)

To analyse the code, use the following command:

```
composer analyse
```

Code Formatting
---------------

[](#code-formatting)

To format the code, use the following command:

```
composer format
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance64

Regular maintenance activity

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~156 days

Recently: every ~195 days

Total

6

Last Release

54d ago

PHP version history (2 changes)v0.0.1PHP ^8.1

v0.0.6PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7bb3bbd6b71163ad5f4871aca931336ac3f8c045b9fef5c8b7e0618b62f6efa?d=identicon)[emargareten](/maintainers/emargareten)

---

Top Contributors

[![emargareten](https://avatars.githubusercontent.com/u/46111162?v=4)](https://github.com/emargareten "emargareten (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

httploglaravelclient-logger-laravel

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/emargareten-client-logger-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/emargareten-client-logger-laravel/health.svg)](https://phpackages.com/packages/emargareten-client-logger-laravel)
```

###  Alternatives

[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[bilfeldt/laravel-http-client-logger

A logger for the Laravel HTTP Client

1531.6M3](/packages/bilfeldt-laravel-http-client-logger)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[kozz/laravel-guzzle-provider

Guzzle 5/6 Service Provider for Laravel

621.1M2](/packages/kozz-laravel-guzzle-provider)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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