PHPackages                             bhuvidya/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. [Database &amp; ORM](/categories/database)
4. /
5. bhuvidya/laravel-query-logger

ActiveLibrary[Database &amp; ORM](/categories/database)

bhuvidya/laravel-query-logger
=============================

A tool to log all database queries in a Laravel application. Bug kudos to `overtrue`, on whose work this package is originally based (overtrue/laravel-query-logger).

v8.0.2(5y ago)019MITPHPPHP &gt;=7.2.0

Since Mar 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bhuvidya/laravel-query-logger)[ Packagist](https://packagist.org/packages/bhuvidya/laravel-query-logger)[ Docs](https://github.com/bhuvidya/laravel-query-logger)[ RSS](/packages/bhuvidya-laravel-query-logger/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Laravel Query Logger
====================

[](#laravel-query-logger)

[![License](https://camo.githubusercontent.com/2b6ff9678a1e3ee535f1fe1dc526a48597bde3d3792701246a66324550b1e5ca/68747470733a2f2f706f7365722e707567782e6f72672f62687576696479612f6c61726176656c2d71756572792d6c6f676765722f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bhuvidya/laravel-query-logger)[![Total Downloads](https://camo.githubusercontent.com/f5773ad3ad02775b7adb94400eb34c28d0829d3ba6aac138cf3cce0e8f8639f1/68747470733a2f2f706f7365722e707567782e6f72672f62687576696479612f6c61726176656c2d71756572792d6c6f676765722f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bhuvidya/laravel-query-logger)[![Latest Stable Version](https://camo.githubusercontent.com/587e6a0e12c952262a1af182358096fd370c038b75e37733c5cb4e2c920d3492/68747470733a2f2f706f7365722e707567782e6f72672f62687576696479612f6c61726176656c2d71756572792d6c6f676765722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bhuvidya/laravel-query-logger)[![Latest Unstable Version](https://camo.githubusercontent.com/5ca123024cae776398b971f13bb2750463e119ef872b0cbcfdf74c9faf202ab9/68747470733a2f2f706f7365722e707567782e6f72672f62687576696479612f6c61726176656c2d71756572792d6c6f676765722f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bhuvidya/laravel-query-logger)

**Note I have now switched the semver versioning for my Laravel packages to "match" the latest supported Laravel version.**

Laravel Query Logger is a package to enable easy and flexible logging of all or a select range of database queries. It supports standard logging, and well as dump-server.

Big kudos to github user `overtrue`, on whose work this package is based (). I ended up doing so many changes that I thought it best to start my own package.

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

[](#installation)

Add `bhuvidya/laravel-query-logger` to your app:

```
$ composer require "bhuvidya/laravel-query-logger"

```

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

[](#configuration)

You can do just about any configuration you need via your `.env` file. The env variables used are:

```
QUERY_LOGGER_ON
QUERY_LOGGER_ENV
QUERY_LOGGER_PARAM
QUERY_LOGGER_ALL
QUERY_LOGGER_MIN_TIME
QUERY_LOGGER_EMIT_LOG
QUERY_LOGGER_EMIT_LEVEL
QUERY_LOGGER_EMIT_CHANNEL
QUERY_LOGGER_EMIT_STACK
QUERY_LOGGER_EMIT_PREFIX
QUERY_LOGGER_EMIT_DUMP_SERVER
QUERY_LOGGER_INSTANCE
QUERY_LOGGER_FACADE

```

If for some reason you prefer to manage your own configuration file, run the following command:

```
$ php artisan vendor:publish --provider='Bhuvidya\Countries\CountriesServiceProvider' --tag=config
```

The config file can then be found at `config/query_logger.php`.

Usage
-----

[](#usage)

TODO

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Recently: every ~86 days

Total

8

Last Release

2108d ago

Major Versions

v0.5 → v8.02020-09-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/d88c0eb87ca5e69e7db7aaebd5ae9545f913b4890146afe0f2be21d5a5a41793?d=identicon)[bhuvidya](/maintainers/bhuvidya)

---

Top Contributors

[![bhuvidya](https://avatars.githubusercontent.com/u/455707?v=4)](https://github.com/bhuvidya "bhuvidya (9 commits)")

---

Tags

loglaraveldatabasequery

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11222.5M32](/packages/anourvalar-eloquent-serialize)[tpetry/laravel-query-expressions

Database-independent Query Expressions as a replacement to DB::raw calls

360542.0k3](/packages/tpetry-laravel-query-expressions)[muhdfaiz/laravel-tail-db

Provide artisan command to monitor realtime database query executed from the application. Able to automatically run explain command for each of query received.

5827.1k](/packages/muhdfaiz-laravel-tail-db)[waad/laravel-model-metadata

A robust Laravel package for handling metadata with JSON casting, custom relation names, and advanced querying capabilities.

854.1k](/packages/waad-laravel-model-metadata)[addapp/laravel-query-log

Logs full mysql queries.

125.4k](/packages/addapp-laravel-query-log)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

111.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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