PHPackages                             liveteched/request-logs - 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. liveteched/request-logs

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

liveteched/request-logs
=======================

Store request/response data and headers from receiving API calls

v1.0.2(1y ago)112MITPHPPHP ^8.0

Since May 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/liveteched/request-logs)[ Packagist](https://packagist.org/packages/liveteched/request-logs)[ RSS](/packages/liveteched-request-logs/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Log API requests inside your Laravel app
========================================

[](#log-api-requests-inside-your-laravel-app)

The `liveteched/request-logs` package provides way to store API call request/response data with headers and custom attributes The Package stores all requests in the `request_logs` table with ability to define polymorphic relationships in `request_log_relations` table.

The Package doesn't provide **views** to see logs, you can do that yourself if you need it.

There are two optional fields in `request_logs` table

- `channel` - used to set unique channel name for API. Ex: `client1-api`
- `action` - used to set API action. Ex: `login`, `retrieve`, `event_modified` etc

Both are used for easier searching/handling DB records

Installation:
-------------

[](#installation)

```
$ composer require shambou/request-logs
$ php artisan requestlogs:install
$ php artisan migrate

```

Configuration:
--------------

[](#configuration)

```
return [
    /*
     * Currently supports only json and soap channels
     * Keep in mind that all channels must be defined in single dimension:
     * ex: 'json' => ['client-api', 'second-client-api']
     *
     * Used to parse request/response data from DB
     * ex:
     * {
     *   "data1": "something",
     *   "data2": "something",
     *   "data3": "something"
     * }
     *
     * will become:
     *
     * data1: something\n
     * data2: something\n
     * data3: something
     *
     * This is attached automatically to \Models\RequestLog parsed_request and parsed_response attributes
     */
    'channels' => [
        'json' => [],
        'soap'  => []
    ]
];

```

Example usage 1: REST
---------------------

[](#example-usage-1-rest)

```
$startTime = microtime(true);
$response = response()->json([
    'success' => true
]);

$relation = User::find(1);

RequestLogFactory::createForRest($request)
    ->setJsonResponse($response)
    ->setAction('login')
    ->setChannel('client-api')
    ->setExectionTime(microtime(true) - $startTime)
    ->setCustomData([
        'transaction_id' => 'ecfe78cc-10ce-49d2-bb31-29b01da03fc6'
    ])
    ->storeLog($relation);

```

Example usage 2: SOAP
---------------------

[](#example-usage-2-soap)

```
$wsdlUrl = 'https://api.example.com/soap/V10023.ASMX?WSDL'
$startTime = microtime(true);
$relation = User::find(1);

RequestLogFactory::createForSoap($wdsUrl, $soapClient)
    ->setAction('login')
    ->setChannel('client-soap-api')
    ->setExectionTime(microtime(true) - $startTime)
    ->setCustomData([
        'transaction_id' => 'ecfe78cc-10ce-49d2-bb31-29b01da03fc6'
    ])
    ->storeLog($relation);

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

3

Last Release

553d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/468642?v=4)[Saša Milašinović](/maintainers/Shambou)[@Shambou](https://github.com/Shambou)

---

Top Contributors

[![Shambou](https://avatars.githubusercontent.com/u/468642?v=4)](https://github.com/Shambou "Shambou (25 commits)")

### Embed Badge

![Health badge](/badges/liveteched-request-logs/health.svg)

```
[![Health](https://phpackages.com/badges/liveteched-request-logs/health.svg)](https://phpackages.com/packages/liveteched-request-logs)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M341](/packages/open-telemetry-sdk)

PHPackages © 2026

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