PHPackages                             pnlinh/laravel-query-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. pnlinh/laravel-query-logger

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

pnlinh/laravel-query-logger
===========================

Quick enable/disable query logger in Laravel

v1.0.7(1y ago)71701MITPHPPHP ^7.1.3|^7.3|^8.0

Since Apr 4Pushed 1y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

Enable/disable query logger in Laravel/Lumen
============================================

[](#enabledisable-query-logger-in-laravellumen)

[![StyleCI](https://camo.githubusercontent.com/c3408c09351c396dae588705d29a18e432be2bcc91eba357fe17654063c6f960/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3437373735323630342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/477752604?branch=master)[![CircleCI](https://camo.githubusercontent.com/8d718055bf59c4b9e443c4258612a4f6fbbc21bf1f9084aaf02a7046f7d9f08f/68747470733a2f2f636972636c6563692e636f6d2f67682f706e6c696e682f6c61726176656c2d71756572792d6c6f676765722f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/pnlinh/laravel-query-logger/tree/master)[![Quality Score](https://camo.githubusercontent.com/56d5afd0fb30ab7f004f298743deda7b25478792da2298cda0d7c26c9d68056e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f706e6c696e682f6c61726176656c2d71756572792d6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/pnlinh/laravel-query-logger/)

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

[](#requirements)

- PHP &gt;= 7.1.3
- Laravel &gt;= 5.5.\*

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

[](#installation)

Require this package with composer.

```
composer require pnlinh/laravel-query-logger --dev
```

To publishes config `config/query-logger.php`, use command:

```
php artisan vendor:publish --tag="query-logger"
```

Usage
-----

[](#usage)

To enable log query, set .env file below

```
QUERY_LOGGER_ENABLED=true

```

To disable log query, set .env file below

```
QUERY_LOGGER_ENABLED=false

```

Test
----

[](#test)

- Without Docker

```
composer test
```

- With Docker

```
make test
```

Credits
-------

[](#credits)

- [Ngoc Linh Pham](https://github.com/pnlinh)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.9% 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 ~130 days

Recently: every ~221 days

Total

8

Last Release

589d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5162a0294c9d7ddf47b6a0059206778b1f06269e73c560d07aea5683d1e65b0c?d=identicon)[pnlinh](/maintainers/pnlinh)

---

Top Contributors

[![pnlinh](https://avatars.githubusercontent.com/u/26193890?v=4)](https://github.com/pnlinh "pnlinh (31 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/pnlinh-laravel-query-logger/health.svg)

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

###  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)
