PHPackages                             dpodsiadlo/ldt - 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. dpodsiadlo/ldt

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

dpodsiadlo/ldt
==============

Debug Tools for Laravel

v1.1.1(9y ago)155MITPHPPHP &gt;=5.6

Since Jun 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dpodsiadlo/ldt)[ Packagist](https://packagist.org/packages/dpodsiadlo/ldt)[ RSS](/packages/dpodsiadlo-ldt/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

LDT - Debug Tools for Laravel
=============================

[](#ldt---debug-tools-for-laravel)

A package that extends Monolog and throws debug data to an external debugger.

### Installation

[](#installation)

Via Composer

```
$ composer require dpodsiadlo/ldt
```

### Configuration

[](#configuration)

Once installed, register Laravel service provider, in your `config/app.php`:

```
'providers' => [
	...
    DPodsiadlo\LDT\Providers\LDTServiceProvider::class,
]
```

Also register a middleware for logging requests and responses, in your `app/Http/Kernel.php`:

```
protected $middleware = [
    ...
    \DPodsiadlo\LDT\Middleware\LogSender::class,
];
```

You might also want to change the default (1800) port for external debugger (in `.env`):

```
LDT_DEBUG_PORT=1801

```

### Basic Usage

[](#basic-usage)

Use default Laravel Log Facade that provides access to the Monolog Writter.

```
use Log; //Laravel Log Facade

...

Log::emergency($error);
Log::alert($error);
Log::critical($error);
Log::error($error);
Log::warning($error);
Log::notice($error);
Log::info($error);
Log::debug($error);
```

### Custom requests

[](#custom-requests)

Here is an example how to log a separate custom request with response, it might be helpful for debugging third party APIs:

```
use DPodsiadlo\LDT\LDT;
use DPodsiadlo\LDT\Log\Request;
use DPodsiadlo\LDT\Log\Response;

...

$params = ["param1" => "someValue"];
$targetUrl = "https://third-party-service.com";

$context = stream_context_create([
        'http' => [
            'header' => "Accept: */*\r\nContent-Type: application/json\r\nUser-Agent: API-WRAPER/1.0\r\n",
            'method' => "POST",
            'content' => json_encode($params),
            'ignore_errors' => true
        ]
    ]);

$res = file_get_contents($targetUrl, false, $context);

if (!empty($http_response_header)) {

    $status = (int)explode(' ', $http_response_header[0])[1];

    LDT::log(new Request($targetUrl, "POST", $params), new Response($res, $status, $http_response_header]), true);
}
```

##### Custom storage

[](#custom-storage)

Also it's possible to store the custom log to a separate log file:

```
use DPodsiadlo\LDT\LDT;
use DPodsiadlo\LDT\Log\Request;
use DPodsiadlo\LDT\Log\Response;

...

$params = ["param1" => "someValue"];
$targetUrl = "https://third-party-service.com";

$context = stream_context_create([
        'http' => [
            'header' => "Accept: */*\r\nContent-Type: application/json\r\nUser-Agent: API-WRAPER/1.0\r\n",
            'method' => "POST",
            'content' => json_encode($params),
            'ignore_errors' => true
        ]
    ]);

$res = file_get_contents($targetUrl, false, $context);

if (!empty($http_response_header)) {

    $status = (int)explode(' ', $http_response_header[0])[1];

    LDT::log(new Request($targetUrl, "POST", $params), new Response($res, $status, $http_response_header]), true, "third-party-log");
}
```

Log file name will be generated automatically based on `$storage` parameter and Laravel `app.log` config. By default log will be generated in `single` mode.

### Remote debugging

[](#remote-debugging)

You might also want to debug a remote instance of your project. To do that please use SSH client with port forwarding enabled:

```
ssh me@some-server.com -R 1800:localhost:1800
```

### External Debugger

[](#external-debugger)

LDT is compatible with [LDT Console](https://chrome.google.com/webstore/detail/ldt-console/icopnphbbahdenofbalbonlkclmfaoio) - Free Chrome App.

### License

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/dpodsiadlo/ldt/blob/master/LICENSE) for more information.

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~48 days

Total

7

Last Release

3504d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6

v1.0.2PHP ^5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7e627b65692043f420c6fa3ceabe1ff78af32a9489e2978fe05bc0b448104f9?d=identicon)[Daniel Podsiadło](/maintainers/Daniel%20Podsiad%C5%82o)

---

Top Contributors

[![daniel-hungrymedia](https://avatars.githubusercontent.com/u/94077062?v=4)](https://github.com/daniel-hungrymedia "daniel-hungrymedia (13 commits)")

---

Tags

laraveldebugtoolsmonolog

### Embed Badge

![Health badge](/badges/dpodsiadlo-ldt/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)[illuminate/routing

The Illuminate Routing package.

1239.4M3.5k](/packages/illuminate-routing)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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