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

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

saint/laravel-logger
====================

Log SQL/Cache queries in Laravel/Lumen framework

17PHP

Since Jan 6Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Simple SQL Logger
-----------------

[](#simple-sql-logger)

This module allows you to log SQL queries (and slow SQL queries) to log file in Laravel/Lumen framework. It's useful mainly when developing your application to verify whether your queries are valid and to make sure your application doesn't run too many or too slow database queries.

### Installation

[](#installation)

#### Laravel 5.\*

[](#laravel-5)

1. Run

    ```
        composer require mnabialek/laravel-sql-logger
    ```

    in console to install this module
2. Open `config/app.php` and in `providers` section add:

    ```
     Mnabialek\LaravelSqlLogger\Providers\ServiceProvider::class,
    ```
3. Run:

    ```
    php artisan vendor:publish --provider="Mnabialek\LaravelSqlLogger\Providers\ServiceProvider"
    ```

    in your console to publish default configuration files
4. Open `config/sql_logger.php` file and adjust settings to your need (by default it uses `.env` file so you can skip this step if you want).
5. In your .env file add the following entries:

    ```
    SQL_LOG_QUERIES=true
    SQL_LOG_SLOW_QUERIES=true
    SQL_SLOW_QUERIES_MIN_EXEC_TIME=100
    SQL_LOG_OVERRIDE=false
    SQL_LOG_DIRECTORY=logs/sql
    SQL_CONVERT_TIME_TO_SECONDS=false
    SQL_LOG_SEPARATE_ARTISAN=false

    ```

    and adjust values to your needs. If you have also `.env.sample` it's also recommended to add those entries also in `.env.sample` file just to make sure everyone know about those env variables. Be aware that `SQL_LOG_DIRECTORY` is directory inside storage directory. If you want you can change it editing `config/sql_logger.php` file
6. Make sure directory specified in `.env` file exists in storage path and you have valid file permissions to create and modify files in this directory

#### Lumen 5.\*

[](#lumen-5)

1. Run

    ```
        composer require mnabialek/laravel-sql-logger
    ```

    in console to install this module
2. Open `bootstrap/app.php` and add:

    ```
    $app->register(Mnabialek\LaravelSqlLogger\Providers\ServiceProvider::class);
    ```
3. In your .env file add the following entries:

    ```
    SQL_LOG_QUERIES=true
    SQL_LOG_SLOW_QUERIES=true
    SQL_SLOW_QUERIES_MIN_EXEC_TIME=100
    SQL_LOG_OVERRIDE=false
    SQL_LOG_DIRECTORY=logs/sql
    SQL_CONVERT_TIME_TO_SECONDS=false
    SQL_LOG_SEPARATE_ARTISAN=false

    ```

    and adjust values to your needs. If you have also `.env.sample` it's also recommended to add those entries also in `.env.sample` file just to make sure everyone know about those env variables. Be aware that `SQL_LOG_DIRECTORY` is directory inside storage directory.
4. Make sure directory specified in `.env` file exists in storage path and you have valid file permissions to create and modify files in this directory

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7350452?v=4)[saint](/maintainers/dlsaint)[@dlsaint](https://github.com/dlsaint)

---

Top Contributors

[![saintho](https://avatars.githubusercontent.com/u/13727361?v=4)](https://github.com/saintho "saintho (2 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/saint-laravel-logger/health.svg)](https://phpackages.com/packages/saint-laravel-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)
