PHPackages                             programming\_cat/laravel-querylog - 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. programming\_cat/laravel-querylog

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

programming\_cat/laravel-querylog
=================================

output query log with 'querylog' channel

v2.02(1y ago)081MITPHPPHP ^7.3|^8.0

Since Oct 3Pushed 1y agoCompare

[ Source](https://github.com/WildcardProject/laravel-querylog)[ Packagist](https://packagist.org/packages/programming_cat/laravel-querylog)[ RSS](/packages/programming-cat-laravel-querylog/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

programming\_cat/querylog
=========================

[](#programming_catquerylog)

[![Packagist Stable Version](https://camo.githubusercontent.com/337e6d420f4b9de9283839247f9aa0443fd27ed7c16466e579a24b9bdc4208bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f6772616d6d696e675f6361742f71756572796c6f672e7376673f7374796c653d666c61742d737175617265266c6162656c3d737461626c65)](https://packagist.org/packages/programming_cat/querylog)[![Packagist downloads](https://camo.githubusercontent.com/675c3b755017c1bf91017b35420357b7608d3f918030f6c1e04d3bcfb056358b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726f6772616d6d696e675f6361742f71756572796c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/programming_cat/querylog)[![MIT Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

About QueryLog
--------------

[](#about-querylog)

Laravel has no query log ecosystem. why?

Install
-------

[](#install)

```
composer require programming_cat/querylog

```

that's all you should do.

How to use
----------

[](#how-to-use)

Once you installed programming\_cat/querylog your sql query would have been recorded into "storage/logs/query-yyyy-mm-dd.log".

### Logging into query log

[](#logging-into-query-log)

```
\Log::channel('querylog')->debug("QUERY!");

```

Configure
---------

[](#configure)

### default values

[](#default-values)

keyvaluedriver"custom"via\\programming\_cat\\QueryLog\\Services\\CreateQueryLogger::classpathstorage\_path('logs/query.log')leveldebugdays30excludes**none**if config keys are exists in config/logging.php these variables are marged with existing variables. likely..

```
array_merge($packaged_config_values, $existing_config_values);

```

### logging.channels.querylog.driver

[](#loggingchannelsquerylogdriver)

"driver" must be "custom".

### logging.channels.querylog.via

[](#loggingchannelsquerylogvia)

"via" must be "programming\_cat\\QueryLog\\Services\\CreateQueryLogger"

### logging.channels.querylog.path

[](#loggingchannelsquerylogpath)

define log path as you like. default variable is storage\_path('logs/query.log').

### logging.channels.querylog.level

[](#loggingchannelsqueryloglevel)

log level. see [monolog imprementation](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Logger.php#L95)

### logging.channels.querylog.days

[](#loggingchannelsquerylogdays)

set rotation days. default is 30.

### logging.channels.querylog.excludes

[](#loggingchannelsquerylogexcludes)

regexp definition string or function returns boolean.

*string*

```
  'excludes' => '^(insert|update) '

```

*function*

```
  'excludes' => function (string $query) {
    return strpos($query, 'exlude-table-name') !== FALSE;
  }

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 78.3% 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 ~609 days

Total

4

Last Release

591d ago

Major Versions

1.1 → v2.02021-03-07

PHP version history (3 changes)v1.0.0PHP ~7.1

1.1PHP ^7.1|^8.0

v2.02PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbda17f9787d8faddf8730c3c4d6ffa4bbca106677539436a3219eb7abc9641d?d=identicon)[programming\_cat](/maintainers/programming_cat)

---

Top Contributors

[![yamassiette](https://avatars.githubusercontent.com/u/93562808?v=4)](https://github.com/yamassiette "yamassiette (18 commits)")[![takanori-yamazaki](https://avatars.githubusercontent.com/u/27663415?v=4)](https://github.com/takanori-yamazaki "takanori-yamazaki (5 commits)")

---

Tags

loglaravelpackagesqlquerywildcardprogramming\_cat

### Embed Badge

![Health badge](/badges/programming-cat-laravel-querylog/health.svg)

```
[![Health](https://phpackages.com/badges/programming-cat-laravel-querylog/health.svg)](https://phpackages.com/packages/programming-cat-laravel-querylog)
```

###  Alternatives

[rennokki/laravel-eloquent-query-cache

Adding cache on your Laravel Eloquent queries' results is now a breeze.

1.1k4.0M14](/packages/rennokki-laravel-eloquent-query-cache)[mnabialek/laravel-sql-logger

Log SQL queries in Laravel/Lumen framework

158796.3k2](/packages/mnabialek-laravel-sql-logger)[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.

5826.7k](/packages/muhdfaiz-laravel-tail-db)[sarfraznawaz2005/indexer

Laravel package to monitor SELECT queries and offer best possible INDEX fields.

562.7k](/packages/sarfraznawaz2005-indexer)[addapp/laravel-query-log

Logs full mysql queries.

135.4k](/packages/addapp-laravel-query-log)

PHPackages © 2026

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