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 1mo ago

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

31

—

LowBetter than 68% of packages

Maintenance40

Moderate activity, may be stable

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

505d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7177b1223224084cbc0ed5b210d55facadb95fd1898bf639da484bbdaf6c8d10?d=identicon)[Shambou](/maintainers/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.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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