PHPackages                             tburschka/zf2-doctrine-sql-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. tburschka/zf2-doctrine-sql-logger

ActiveZf-module[Database &amp; ORM](/categories/database)

tburschka/zf2-doctrine-sql-logger
=================================

Logs Doctrine DBAL queries with a Zend Log.

1.0.1(8y ago)94.9k4MITPHPPHP &gt;=5.3.23

Since Jul 10Pushed 8y ago3 watchersCompare

[ Source](https://github.com/tburschka/zf2-doctrine-sql-logger)[ Packagist](https://packagist.org/packages/tburschka/zf2-doctrine-sql-logger)[ Docs](https://github.com/tburschka/zf2-doctrine-sql-logger)[ RSS](/packages/tburschka-zf2-doctrine-sql-logger/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

ZF2DoctrineSQLLogger
====================

[](#zf2doctrinesqllogger)

Logs Doctrine DBAL queries as plain SQL with a Zend\\Log\\Logger.

Usage
-----

[](#usage)

1. Add to require list in composer.json file (and of cause execute `composer.phar update`)

    ```
     "tburschka/zf2-doctrine-sql-logger": "~1.0"

    ```
2. Add to modules list in application.config.php

    ```
     'ZF2DoctrineSQLLogger'

    ```
3. Create a new Zend\\Log\\Logger or use an existing one

    ```
     [...]
     'service_manager' => array(
         'factories' => array(
             'doctrine.sql_logger' => function () {
                 $writer = new Zend\Log\Writer\Stream('data/logger_doctrine_sql.log');
                 $logger = new Zend\Log\Logger();
                 $logger->addWriter($writer);
                 return $logger;
             },
         ),
     ),
     [...]

    ```
4. Configure the Z2fDoctrineSQLLogger

    ```
     [...]
     'ZF2DoctrineSQLLogger' => array(
         'entitymanager'     => 'doctrine.entitymanager.orm_default',
         'logger'            => 'doctrine.sql_logger',
         'priority'          => Zend\Log\Logger::NOTICE,
         'log_executiontime' => false,
     ),
     [...]

    ```
5. Enable logger for doctrine

    ```
     [...]
     'doctrine' => array(
         'configuration' => array(
             'orm_default' => array(
                 'sql_logger' => 'ZF2DoctrineSQLLogger',
             ),
         ),
     ),
     [...]

    ```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3041d ago

### Community

Maintainers

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

---

Tags

logdoctrinesqlzf2

### Embed Badge

![Health badge](/badges/tburschka-zf2-doctrine-sql-logger/health.svg)

```
[![Health](https://phpackages.com/badges/tburschka-zf2-doctrine-sql-logger/health.svg)](https://phpackages.com/packages/tburschka-zf2-doctrine-sql-logger)
```

###  Alternatives

[hounddog/doctrine-data-fixture-module

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

37335.9k9](/packages/hounddog-doctrine-data-fixture-module)[coolcsn/csn-user

Authentication based on DoctrineORMModule

346.9k2](/packages/coolcsn-csn-user)[mamuz/mamuz-blog

Provides blog feature for ZF2 with Doctrine

101.1k1](/packages/mamuz-mamuz-blog)[coolcsn/csn-authorization

Authorization based on DoctrineORMModule and ACL

133.5k](/packages/coolcsn-csn-authorization)

PHPackages © 2026

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