PHPackages                             ngmy/laravel-query-log-tracker - 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. ngmy/laravel-query-log-tracker

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

ngmy/laravel-query-log-tracker
==============================

The Laravel package which log all executed queries.

0.3.0(5y ago)0934[3 PRs](https://github.com/ngmy/laravel-query-log-tracker/pulls)MITPHPPHP ^7.3|^8.0

Since Mar 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ngmy/laravel-query-log-tracker)[ Packagist](https://packagist.org/packages/ngmy/laravel-query-log-tracker)[ Fund](https://flattr.com/@ngmy)[ GitHub Sponsors](https://github.com/ngmy)[ RSS](/packages/ngmy-laravel-query-log-tracker/feed)WikiDiscussions master Synced yesterday

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

Laravel Query Log Tracker
=========================

[](#laravel-query-log-tracker)

[![Latest Stable Version](https://camo.githubusercontent.com/5b84741bbd35cb98a318b865c0a7e4734b6e738d4524468ef57e1ee7c15106d8/68747470733a2f2f706f7365722e707567782e6f72672f6e676d792f6c61726176656c2d71756572792d6c6f672d747261636b65722f762f737461626c65)](https://packagist.org/packages/ngmy/laravel-query-log-tracker)[![Total Downloads](https://camo.githubusercontent.com/bb43c650435b26ab40b43f2e2591a1309914b97c45332af6cf316d164e170301/68747470733a2f2f706f7365722e707567782e6f72672f6e676d792f6c61726176656c2d71756572792d6c6f672d747261636b65722f646f776e6c6f616473)](https://packagist.org/packages/ngmy/laravel-query-log-tracker)[![Latest Unstable Version](https://camo.githubusercontent.com/62153f931bcce48a350b241ee81a8653ff2232a8a7ab7bc5b833f23ae3e5c2bc/68747470733a2f2f706f7365722e707567782e6f72672f6e676d792f6c61726176656c2d71756572792d6c6f672d747261636b65722f762f756e737461626c65)](https://packagist.org/packages/ngmy/laravel-query-log-tracker)[![License](https://camo.githubusercontent.com/20db48b7be14a0003ce700c7ab88b51f2a6402e1fde5970295e638366f543ab4/68747470733a2f2f706f7365722e707567782e6f72672f6e676d792f6c61726176656c2d71756572792d6c6f672d747261636b65722f6c6963656e7365)](https://packagist.org/packages/ngmy/laravel-query-log-tracker)[![composer.lock](https://camo.githubusercontent.com/a979230c81e3b1e4ecdfed5c6a98fb1dd1811791b0f5d01b3382eadc720d28fa/68747470733a2f2f706f7365722e707567782e6f72672f6e676d792f6c61726176656c2d71756572792d6c6f672d747261636b65722f636f6d706f7365726c6f636b)](https://packagist.org/packages/ngmy/laravel-query-log-tracker)
[![PHP CI](https://github.com/ngmy/laravel-query-log-tracker/workflows/PHP%20CI/badge.svg)](https://github.com/ngmy/laravel-query-log-tracker/actions?query=workflow%3A%22PHP+CI%22)[![Coverage Status](https://camo.githubusercontent.com/a5b0f765e1634c9ab82cdc5d473dbae5169ebb907d7e28ed6d990e48568b8dcf/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e676d792f6c61726176656c2d71756572792d6c6f672d747261636b65722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/ngmy/laravel-query-log-tracker?branch=master)

The Laravel package which log all executed queries.

Demo
----

[](#demo)

[![Demo](https://camo.githubusercontent.com/535296bc090c13a1a1aa7345af462b097ea4c2820077c9eee8b6c77b032343f1/68747470733a2f2f6e676d792e6769746875622e696f2f6c61726176656c2d71756572792d6c6f672d747261636b65722f64656d6f2e676966)](https://camo.githubusercontent.com/535296bc090c13a1a1aa7345af462b097ea4c2820077c9eee8b6c77b032343f1/68747470733a2f2f6e676d792e6769746875622e696f2f6c61726176656c2d71756572792d6c6f672d747261636b65722f64656d6f2e676966)

Features
--------

[](#features)

Laravel Query Log Tracker has the following features:

- Log all executed queries with the following items:
    - SQL with bound parameters
    - Bind parameters
    - Execution time in milliseconds
    - Connection name
- Disable/Enable query logging at runtime
- More configurations:
    - Log level
    - Exclude patterns
    - Channels

Requirements
------------

[](#requirements)

Laravel Query Log Tracker has the following requirements:

- PHP &gt;= 7.3
- Laravel &gt;= 6.0

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

[](#installation)

Execute the Composer `require` command:

```
composer require ngmy/laravel-query-log-tracker
```

This will update your `composer.json` file and install this package into the `vendor` directory.

If you don't use package discovery, add the service provider to the `providers` array in the `config/app.php` file:

```
Ngmy\LaravelQueryLogTracker\QueryLogTrackerServiceProvider::class,
```

If you don't use package discovery, add the alias to the `aliases` array in the `config/app.php` file:

```
'QueryLogTracker' => Ngmy\LaravelQueryLogTracker\QueryLogTrackerFacade::class,
```

### Publishing Configuration

[](#publishing-configuration)

Execute the Artisan `vendor:publish` command:

```
php artisan vendor:publish
```

This will publish the configuration file to the `config/ngmy-query-log-tracker.php` file.

You can also use the tag to execute the command:

```
php artisan vendor:publish --tag=ngmy-query-log-tracker
```

You can also use the service provider to execute the command:

```
php artisan vendor:publish --provider="Ngmy\LaravelQueryLogTracker\QueryLogTrackerServiceProvider"
```

Usage
-----

[](#usage)

### Log Queries

[](#log-queries)

Execute queries with Laravel. That's all.

### Disable Log

[](#disable-log)

There are two ways to disable log.

```
QueryLogTracker::beginDisable();
// Execute queries for which you want to disable log
QueryLogTracker::endDisable();
```

```
QueryLogTracker::disable(function () {
    // Execute queries for which you want to disable log
});
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

3

Last Release

1951d ago

PHP version history (2 changes)0.1.0PHP ^7.2

0.3.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7420a4f9654469ce1854f94fe56c240f0b930e692cdcfc8746f8a46480d9579d?d=identicon)[ngmy](/maintainers/ngmy)

---

Top Contributors

[![ngmy](https://avatars.githubusercontent.com/u/864041?v=4)](https://github.com/ngmy "ngmy (40 commits)")

---

Tags

laravellibraryloggingphpquery-log

### Embed Badge

![Health badge](/badges/ngmy-laravel-query-log-tracker/health.svg)

```
[![Health](https://phpackages.com/badges/ngmy-laravel-query-log-tracker/health.svg)](https://phpackages.com/packages/ngmy-laravel-query-log-tracker)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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