PHPackages                             topup/laralog - 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. topup/laralog

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

topup/laralog
=============

Log request &amp; response including header, body etc...

v2.0.3(5y ago)2194MITPHPPHP &gt;=7.2

Since Feb 3Pushed 1y ago7 watchersCompare

[ Source](https://github.com/topupLtd/laralog)[ Packagist](https://packagist.org/packages/topup/laralog)[ RSS](/packages/topup-laralog/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (4)Dependencies (1)Versions (10)Used By (0)

Topup Logger
============

[](#topup-logger)

A tiny package to debug request &amp; response. It will log request &amp; response header, user IP, time took to process the request &amp; sending response. If a logged in user make the request it will log the user ID too.

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

[](#installation)

1. Install the package via composer

```
composer require topup/laralog
```

Usage
-----

[](#usage)

1. (Optional) Set environment variables to use your own custom layout

```
TOPUP_LOGGER_LAYOUT="topup-logger::app"
TOPUP_LOGGER_CONTENT_SECTION=content
```

Both env value will fall back to package default value.

2. Migrate using the command bellow:

```
php artisan migrate
```

3. Use middleware `topup-logger` to any route that need to debug
4. Log outbound request with guzzle http

```
use GuzzleHttp\Client;
use Topup\Logger\Http\Middleware\TopupGuzzleLoggerMiddleware;

$logger = new TopupGuzzleLoggerMiddleware();
$handlerStack = HandlerStack::create();
$handlerStack->setHandler(new CurlHandler());
$handlerStack->push($logger->log());

$client = new Client(['handler' => $handlerStack]);
```

Or

```
$history = Middleware::history($this->_guzzleReqResContainer);
$this->_handlerStack = HandlerStack::create();
$this->_handlerStack->push($history);

$client = new Client(['handler' => $handlerStack]);

(new LoggerController())->saveLog($this->_guzzleReqResContainer);
```

5. Apply middlewares for package routes via .env

```
TOPUP_LOGGER_ROUTE_MIDDLEWARE=web,auth,admin
```

Separate multiple middlewares with a comma(,) i.e. auth,admin

Default will fallback to `web`

Empty is allowed if you intend not to use any middleware

```
TOPUP_LOGGER_ROUTE_MIDDLEWARE=
```

6. Enjoy

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Recently: every ~28 days

Total

7

Last Release

1848d ago

Major Versions

v1.2.0 → v2.0.02021-02-08

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v1.1.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/8eecda507a44f103e81ebbfbab9b94169f3218d0d5a26873ee81be812773133e?d=identicon)[topup](/maintainers/topup)

---

Top Contributors

[![alaminio](https://avatars.githubusercontent.com/u/2793040?v=4)](https://github.com/alaminio "alaminio (12 commits)")

### Embed Badge

![Health badge](/badges/topup-laralog/health.svg)

```
[![Health](https://phpackages.com/badges/topup-laralog/health.svg)](https://phpackages.com/packages/topup-laralog)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M152](/packages/spatie-laravel-health)[illuminate/log

The Illuminate Log package.

6225.0M601](/packages/illuminate-log)[spatie/laravel-flare

Send Laravel errors to Flare

111.2M6](/packages/spatie-laravel-flare)

PHPackages © 2026

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