PHPackages                             magentron/laravel-request-logger - 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. magentron/laravel-request-logger

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

magentron/laravel-request-logger
================================

HTTP request logger middleware for Laravel

2.0.0(4y ago)010MITPHPPHP &gt;=7.1.3

Since Apr 6Pushed 4y agoCompare

[ Source](https://github.com/Magentron/laravel-request-logger)[ Packagist](https://packagist.org/packages/magentron/laravel-request-logger)[ Docs](https://github.com/Magentron/laravel-request-logger)[ RSS](/packages/magentron-laravel-request-logger/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (6)Used By (0)

Laravel Request Logger
======================

[](#laravel-request-logger)

This is a fork of [prettus/laravel-request-logger](https://github.com/andersao/laravel-request-logger).

Request and Response Logger for Laravel

Inspired by [Morgan - Node HTTP request logger](https://github.com/expressjs/morgan)

[![Latest Stable Version](https://camo.githubusercontent.com/3bf99df892f737047737c681eaf61ee4af687f172da5814aef61f07fcb309b69/68747470733a2f2f706f7365722e707567782e6f72672f6d6167656e74726f6e2f6c61726176656c2d726571756573742d6c6f676765722f762f737461626c652e737667)](https://packagist.org/packages/magentron/laravel-request-logger) [![Total Downloads](https://camo.githubusercontent.com/b9d9e0d5dc1b7b57fe4e01f8c66a7eea695b141bda41acf3f7352ca0518e4590/68747470733a2f2f706f7365722e707567782e6f72672f6d6167656e74726f6e2f6c61726176656c2d726571756573742d6c6f676765722f646f776e6c6f6164732e737667)](https://packagist.org/packages/magentron/laravel-request-logger) [![Latest Unstable Version](https://camo.githubusercontent.com/e40054c6fa2fc385c6b2b1c637ae4dd3ee260ceb1a43eb115982d4265e1e4e8b/68747470733a2f2f706f7365722e707567782e6f72672f6d6167656e74726f6e2f6c61726176656c2d726571756573742d6c6f676765722f762f756e737461626c652e737667)](https://packagist.org/packages/magentron/laravel-request-logger) [![License](https://camo.githubusercontent.com/6f0b2f579d1bed40ca18c6a7b8de567be54d48577e8fc8d2d4b73b2676e595af/68747470733a2f2f706f7365722e707567782e6f72672f6d6167656e74726f6e2f6c61726176656c2d726571756573742d6c6f676765722f6c6963656e73652e737667)](https://packagist.org/packages/magentron/laravel-request-logger)[![Analytics](https://camo.githubusercontent.com/584f238ba1143d812f26015406f778c1ac024c4dd1dd041341ea20fc5ff5e93e/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d36313035303734302d312f6c61726176656c2d726571756573742d6c6f676765722f726561646d65)](https://packagist.org/packages/magentron/laravel-request-logger)

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

[](#installation)

### Composer

[](#composer)

Add `magentron/laravel-request-logger` to the "require" section of your `composer.json` file.

```
	"magentron/laravel-request-logger": "^2.0.0"
```

Run `composer update` to get the latest version of the package.

or

Run `composer require magentron/laravel-request-logger` direct in your terminal

### Laravel

[](#laravel)

In your `config/app.php` add `Prettus\RequestLogger\Providers\LoggerServiceProvider::class` to the end of the `providers` array:

```
'providers' => array(
    ...,
    Prettus\RequestLogger\Providers\LoggerServiceProvider::class,
),
```

Publish Configuration

```
php artisan vendor:publish --provider="Prettus\RequestLogger\Providers\LoggerServiceProvider"
```

Configuration
-------------

[](#configuration)

In your `config/request-logger.php` file, you can change configuration for logger

```
 'logger' => [
    'enabled'   => true,
    'handlers'  => ['Prettus\RequestLogger\Handler\HttpLoggerHandler'],
    'file'      => storage_path("logs/http.log"),
    'level'     => 'info',
    'format'    => 'common'
]
```

PropertyTypeDefault ValueDescriptionenabledbooleantrueEnable or disable log httphandlersarray\['Prettus\\RequestLogger\\Handler\\HttpLoggerHandler'\]Instance of the `Monolog\Handler\HandlerInterface`. (See more)\[\]filestringstorage\_path("logs/http.log")If you are using `Prettus\RequestLogger\Handler\HttpLoggerHandler`, you can set the file will be saved walk logslevelstringinfoLevel logger write: \[notice, info, debug, emergency, alert, critical, error, warning\]formatstringcommonFormat for the log record### Format Interpolation

[](#format-interpolation)

#### Variables

[](#variables)

FormatDescriptionExemple{method}Get the request method.PUT{root}Get the root URL for the application.{url}Get the URL (no query string) for the request.{full-url}Get the full URL for the request.{path}Get the current path info for the request./users{decoded-path}Get the current encoded path info for the request./users{remote-addr}Returns the client IP address.192.168.10.1{format}Gets the format associated with the mime type.html{scheme}Gets the request's scheme.http{port}Returns the port on which the request is made.80{query-string}Generates the normalized query string for the Request.?search=lorem{remote-user}Returns the user.{referer}The page address (if any) by which the user agent to the current page{user-agent}Get user agentMozilla/5.0 (Windows NT 6.3; WOW64){date}Current Date2015-04-05 14:00:00{content}Get the response content.{json:response}{content-length}Get the content length in bytes4863{response-time}Response time in ms231{status}Http status code200{http-version}Http protocol version1.1{server\[*KEY*\]}$\_SERVER Server and execution environment information (See more)\[\]{req\[*HEADER*\]}Request Header values{res\[*HEADER*\]}Response Header values#### Default formats

[](#default-formats)

NameFormatcombined{remote-addr} - {remote-user} \[{date}\] "{method} {url} HTTP/{http-version}" {status} {content-length} "{referer}" "{user-agent}"common{remote-addr} - {remote-user} \[{date}\] "{method} {url} HTTP/{http-version}" {status} {content-length}dev{method} {url} {status} {response-time} ms - {content-length}short{remote-addr} {remote-user} {method} {url} HTTP/{http-version} {status} {content-length} - {response-time} mstiny{method} {url} {status} {content-length} - {response-time} msExamples
--------

[](#examples)

`{method} {full-url}`

```
[2015-04-03 00:00:00] local.INFO: GET http://prettus.local/user/1?param=lorem ["REQUEST"]

```

`{method} {full-url} {remote-addr} {port}`

```
[2015-04-03 00:00:00] local.INFO: GET http://prettus.local/user/1?param=lorem 192.168.10.1 80 ["REQUEST"]

```

`{method} {root} {url} {full-url} {path} {decoded-path} {remote-addr} {format} {scheme} {port} {query-string}`

```
[2015-04-03 00:00:00] local.INFO: GET http://prettus.local http://prettus.local/user/1 http://prettus.local/user/1?param=lorem user/1 user/1 192.168.10.1 html http 80 param=lorem ["REQUEST"]

```

`[{status}] HTTP:{http-version} {content}`

```
[2015-04-03 00:00:00] local.INFO: [200] HTTP:1.1 {"id":1,"name":"Anderson Andrade", "email":"contato@andersonandra.de"} ["RESPONSE"]

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 80.4% 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 ~847 days

Total

4

Last Release

1512d ago

Major Versions

1.2.0 → 2.0.02022-03-22

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=7.1.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/853900?v=4)[Jeroen D.](/maintainers/Magentron)[@Magentron](https://github.com/Magentron)

---

Top Contributors

[![andersao](https://avatars.githubusercontent.com/u/1131667?v=4)](https://github.com/andersao "andersao (41 commits)")[![josemf](https://avatars.githubusercontent.com/u/206655?v=4)](https://github.com/josemf "josemf (7 commits)")[![Magentron](https://avatars.githubusercontent.com/u/853900?v=4)](https://github.com/Magentron "Magentron (1 commits)")[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (1 commits)")[![ozanmuyes](https://avatars.githubusercontent.com/u/1537985?v=4)](https://github.com/ozanmuyes "ozanmuyes (1 commits)")

---

Tags

responserequestlaravellogger

###  Code Quality

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/magentron-laravel-request-logger/health.svg)

```
[![Health](https://phpackages.com/badges/magentron-laravel-request-logger/health.svg)](https://phpackages.com/packages/magentron-laravel-request-logger)
```

###  Alternatives

[prettus/laravel-request-logger

HTTP request logger middleware for Laravel

24646.6k1](/packages/prettus-laravel-request-logger)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[hryha/laravel-request-logger

A Laravel package to log requests and responses

102.2k](/packages/hryha-laravel-request-logger)[yzen.dev/mono-processor

This Processor will display in the logs bread crumbs by which you can more quickly and accurately identify the cause of the error.

116.1k](/packages/yzendev-mono-processor)[tomatophp/filament-logger

Log all user activity to file or log driver and preview it on your FilamentPHP panel

162.2k](/packages/tomatophp-filament-logger)

PHPackages © 2026

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