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

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

anik/laravel-query-logger
=========================

A dev tool to log all queries for laravel/lumen application.

v1.0(7y ago)41961MITPHPPHP &gt;=7.1

Since Jan 26Pushed 6y agoCompare

[ Source](https://github.com/ssi-anik/laravel-query-logger)[ Packagist](https://packagist.org/packages/anik/laravel-query-logger)[ RSS](/packages/anik-laravel-query-logger/feed)WikiDiscussions master Synced 1mo ago

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

 Laravel/Lumen Query Logger
============================

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

 📝 A dev tool to log all queries for Laravel/Lumen application.

Installing
----------

[](#installing)

```
$ composer require anik/laravel-query-logger --dev
```

> Please keep the `--dev` option.

Usage
-----

[](#usage)

1. You need to EXPLICITLY define `LOG_DB_QUERIES` to some values you wish. `(bool) false` will not log any query.
2. If `LOG_DB_QUERIES` is set to `daily`, it'll log on daily basis.
3. For `Lumen` you must have to register the `ServiceProvider` in `bootstrap/app.php`.

```
$app->register(Anik\LaravelQueryLogger\ServiceProvider::class);
```

```
$ tail -f storage/logs/queries.log
```

Or

```
$ tail -f storage/logs/queries-2019-01-27.log
```

```
============ URL: http://laravel.app/discussions ===============
[2019-01-27 18:52:14] [.....800μs] select count(*) as aggregate from `discussions` where `discussions`.`deleted_at` is null
[2019-01-27 18:52:14] [....1.07ms] select * from `discussions` where `discussions`.`deleted_at` is null order by `is_top` desc, `created_at` desc limit 15 offset 0
[2019-01-27 18:52:14] [.....3.63s] select `tags`.*, `taggables`.`taggable_id` as `pivot_taggable_id`, `taggables`.`tag_id` as `pivot_tag_id` from `tags` inner join `taggables` on `tags`.`id` = `taggables`.`tag_id` where `taggables`.`taggable_id` in ('1', '2', '3', '4', '5', '6', '7', '8') and `taggables`.`taggable_type` = 'App\\Models\\Discussion' order by `order_column` asc
[2019-01-27 18:52:14] [.....670μs] select * from `users` where `users`.`id` in ('1', '2', '4') and `users`.`deleted_at` is null
================================================================================

```

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.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

Unknown

Total

1

Last Release

2663d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7180f132fd7bfbbec2083528838f87996e01a6165ef50e58e2f3fcfccda1a834?d=identicon)[ssi-anik](/maintainers/ssi-anik)

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (19 commits)")[![ssi-anik](https://avatars.githubusercontent.com/u/2676602?v=4)](https://github.com/ssi-anik "ssi-anik (8 commits)")[![ruchengtang](https://avatars.githubusercontent.com/u/1282479?v=4)](https://github.com/ruchengtang "ruchengtang (2 commits)")[![seekerliu](https://avatars.githubusercontent.com/u/8923281?v=4)](https://github.com/seekerliu "seekerliu (2 commits)")

### Embed Badge

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

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

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