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

ActiveLibrary

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

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

v2.0.3(4y ago)2191↓100%MITPHPPHP &gt;=7.2

Since Feb 3Pushed 9mo ago7 watchersCompare

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

READMEChangelogDependencies (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

32

↑

LowBetter than 74% of packages

Maintenance41

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

1755d 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-mix-preload

Add preload and prefetch links based your Mix manifest

169175.3k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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