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

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

hxd/query-logger
================

This is a package that saves all database queries to a log file with some customizations

v1.0.5(1y ago)55701MITPHPPHP ^7.3|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4

Since Sep 5Pushed 1y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (3)Versions (8)Used By (1)

Laravel query logger
====================

[](#laravel-query-logger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9e98e6054e3560255a0ab1a19193827f62fb3a8c9ac4e3773b81c0be9e289124/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6878642f71756572792d6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hxd/query-logger)[![Total Downloads](https://camo.githubusercontent.com/22cdc743715a51c418a1a18d068544f401a517d93e7df42489b1275aa7697168/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6878642f71756572792d6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hxd/query-logger)

This is a package that saves all database queries to a log file with some customizations

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

[](#installation)

You can install the package via composer:

```
composer require hxd/query-logger
```

Usage
-----

[](#usage)

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
    // Enable or disable query logger
    'enabled' => env('QUERY_LOGGER_ENABLED', true),

    // Enable or disable query logger for specific connection
    'enable_for_connection' => env('QUERY_LOGGER_ENABLE_FOR_CONNECTION', null),

    // Channel you want to save query into (must have in laravel logging channel config)
    'channel' => env('QUERY_LOGGER_LOG_CHANNEL', 'stack'),

    // Enable or Disable automatically assign values to the query,
    // by default the queries will be hidden values to ensure security.
    // Make sure you know what you're doing when you turn this on
    'enable_map_value' => env('QUERY_LOGGER_ENABLE_MAP_VALUE', true),

    // Log query execute time
    'log_execute_time' => env('QUERY_LOGGER_LOG_EXEC_TIME', true),

    // Look at the name, you know, the threshold to assign "SLOW QUERY" before your query in the log
    'slow_query_threshold' => env('QUERY_LOGGER_SLOW_QUERY_THRESHOLD', 0),

	// Log query execute path
	'log_execute_path' => env('QUERY_LOGGER_LOG_EXEC_PATH', true),

    // Log connetions
    'log_connections' => explode(',', env('QUERY_LOGGER_LOG_CONNECTIONS', '')),
];
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Xuan Dung, Ho](https://github.com/hxd)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% 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 ~152 days

Recently: every ~190 days

Total

6

Last Release

590d ago

PHP version history (3 changes)v1.0.0PHP ^7.4|^8.0|^8.1

v1.0.3PHP ^7.3|^7.4|^8.0|^8.1

v1.0.5PHP ^7.3|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b85c535ecb159be16b5d0fe166eaf263de9ac16ddb276ac8ec50eff4e157462?d=identicon)[xuandung38](/maintainers/xuandung38)

---

Top Contributors

[![xuandung38](https://avatars.githubusercontent.com/u/8670315?v=4)](https://github.com/xuandung38 "xuandung38 (7 commits)")[![dinhquochan](https://avatars.githubusercontent.com/u/9979458?v=4)](https://github.com/dinhquochan "dinhquochan (2 commits)")

---

Tags

query loggerHXD

### Embed Badge

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

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[jerome/filterable

Streamline dynamic Eloquent query filtering with seamless API request integration and advanced caching strategies.

19226.1k](/packages/jerome-filterable)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)[rodrigopedra/laravel-query-logger

Laravel query logger

1211.8k](/packages/rodrigopedra-laravel-query-logger)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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