PHPackages                             azurath/larelog - 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. azurath/larelog

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

azurath/larelog
===============

Laravel Request Logger

1.2.1(3y ago)219MITPHP

Since Oct 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/azurath/larelog)[ Packagist](https://packagist.org/packages/azurath/larelog)[ RSS](/packages/azurath-larelog/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

*La*ravel *Re*quest *Log*ger.
=============================

[](#laravel-request-logger)

Logs all HTTP requests performed to and from your Laravel application, as well as GuzzleHTTP requests.
------------------------------------------------------------------------------------------------------

[](#logs-all-http-requests-performed-to-and-from-your-laravel-application-as-well-as-guzzlehttp-requests)

### Features:

[](#features)

- Log incoming (Laravel) and outgoing (GuzzleHttp) requests
- Blacklists and whitelists for URLs (with regular expressions), MIME types, HTTP status codes
- Save logs to database
- Write logs to Laravel log
- Pass log items to user callback function
- Log rotation (by count and date)
- Save authenticated user (multiple laravel user models are supported)

### Installation

[](#installation)

1. Run `composer require azurath/larelog`
2. Add `\Azurath\Larelog\Middleware\Logger::class` to the end of `$middleware` array in `app/Http/Kernel.php`
3. Run `php artisan vendor:publish --provider=Azurath\Larelog\LarelogProvider`
4. Run `php artisan migrate`
5. Enjoy.

### GuzzleHttp

[](#guzzlehttp)

If you're using GuzzleHttp and want to log requests performed via it, just pass additional parameter while creating GuzzleHttp instance:

```
    $client = new \GuzzleHttp\Client([
        'handler' => (new \Azurath\Larelog\Larelog())->getGuzzleLoggerStack(),
    ]);

```

Or you can attach Larelog callback to existing stack:

```
    $handlerStack = HandlerStack::create();
    //...
    $larelogStackCallback = (new \Azurath\Larelog\Larelog())->getGuzzleLoggerStackItem();
    $handlerStack->push($larelogStackCallback);

```

### Settings

[](#settings)

Settings stored in `config/larelog.php`.

### Log rotation

[](#log-rotation)

Add:

```
$schedule->job(new \Azurath\Larelog\Jobs\RotateLogs())
->hourly()
->withoutOverlapping(60);

```

to `app/Console/Kernel.php` to enable log rotation.

### Convert request item to text

[](#convert-request-item-to-text)

You can get text representation of log item stored in database:

```
$logItem = \Azurath\Larelog\Models\LarelogItem::where(...)->first();
$text = $logItem->formatAsText();

```

### Get authenticated user for the request item

[](#get-authenticated-user-for-the-request-item)

If request performed by authenticated user, it's id and model name (for cases when you have different auth guards with different providers) also saved to db. You can access this user:

```
$logItem = \Azurath\Larelog\Models\LarelogItem::where(...)->first();
$user = $logItem->user;

```

### Fields

[](#fields)

Basically this logger saves request start time (`started_at`), request execution time (`execution_time`), direction of request (`direction`, 'incoming' or 'outgoing'), laravel request type (`type`, api/web/etc), HTTP method (`http_method`), HTTP protocol version (`http_protocol_version`), HTTP response code (`http_code`), URL (`url`), request headers (`request_headers`), request data (`request`), response headers(`response_headers`), response data (`response`), and, if authenticated, Laravel user who're performed this request (property `user`, relation `user()`).

### FAQ

[](#faq)

**Q**: Why 'Azurath'?
**A**: It's misheard name 'Azurewrath', which then spoked like 'Azuraf', which become a nickname spoken like 'Azurat' over a years.

**Q**: Why 'Larelog'?
**A**: **LA**ravel **RE**quest **LOG**ger.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

1300d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/864f1074037f72a6696046034d0e6b4419c28a3b1d3ae302e721e2de13e072c0?d=identicon)[azurath](/maintainers/azurath)

---

Top Contributors

[![azurath](https://avatars.githubusercontent.com/u/11635007?v=4)](https://github.com/azurath "azurath (19 commits)")

---

Tags

httprequestloglaraveldatabasefileloggerhttp requests logger

### Embed Badge

![Health badge](/badges/azurath-larelog/health.svg)

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

###  Alternatives

[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[chelout/laravel-http-logger

A Laravel package to log HTTP requests, headers and sessions

272.0k](/packages/chelout-laravel-http-logger)[dreamfactory/df-core

DreamFactory(tm) Core Components

1651.7k20](/packages/dreamfactory-df-core)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

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