PHPackages                             splash/sonata-admin-monolog-bundle - 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. splash/sonata-admin-monolog-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

splash/sonata-admin-monolog-bundle
==================================

Provide a Doctrine DBAL handler for Monolog with Sonata Admin Implementation. This Bundle is inspired from LexikMonologBrowserBundle.

v1.0.2(9y ago)0625MITPHPPHP &gt;=5.3.2

Since May 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/SplashSync/SonataAdminMonologBundle)[ Packagist](https://packagist.org/packages/splash/sonata-admin-monolog-bundle)[ Docs](https://github.com/lexik/LexikMonologBrowserBundle)[ RSS](/packages/splash-sonata-admin-monolog-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (7)Used By (0)

SonataAdaminMonologBundle
=========================

[](#sonataadaminmonologbundle)

[![Build Status](https://camo.githubusercontent.com/b3dffc8519948487d0b3d58155a277c48c12bf330fd279f58e236eec28ee3fa9/68747470733a2f2f7472617669732d63692e6f72672f53706c61736853796e632f5068702d42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/SplashSync/Php-Bundle)[![Latest Stable Version](https://camo.githubusercontent.com/da17731b7dbbd5db390f0bc446b2175cdde72c57bfa0eeee9a1d19adad5dd514/68747470733a2f2f706f7365722e707567782e6f72672f73706c6173682f736f6e6174612d61646d696e2d6d6f6e6f6c6f672d62756e646c652f762f737461626c65)](https://packagist.org/packages/splash/sonata-admin-monolog-bundle)

This Symfony bundle provides a [Doctrine DBAL](https://github.com/doctrine/dbal) handler for [Monolog](https://github.com/Seldaek/monolog)Web UI to display log entries is integrated to Sonata Admin UI.

You can list, filter and paginate logs as you can see on the screenshot bellow:

[![Log entries listing](https://github.com/SplashSync/SonataAdminMonologBundle/raw/master/src/Resources/screen/list.png)](https://github.com/SplashSync/SonataAdminMonologBundle/raw/master/src/Resources/screen/list.png)[![Log entry show](https://github.com/SplashSync/SonataAdminMonologBundle/raw/master/src/Resources/screen/show.png)](https://github.com/SplashSync/SonataAdminMonologBundle/raw/master/src/Resources/screen/show.png)

As this bundle query your database on each raised log, it's relevant for small and medium projects, but if you have billion of logs consider using a specific log server.

This Bundle is inspired from [LexikMonologBrowserBundle](https://github.com/lexik/LexikMonologBrowserBundle)

Requirements:
-------------

[](#requirements)

- Symfony 3.4+ | 4.0+ | 4.2+
- Sonata-Project/AdminBundle

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

[](#installation)

Installation with composer:

```
    ...
    "require": {
        ...
        "splash/sonata-admin-monolog-bundle": "@stable",
        ...
    },
    ...
```

Next, be sure to enable these bundles in your `Kernel.php` file:

```
public function registerBundles()
{
    return array(
        // SPLASH SONATA ADMIN MONOLOG BUNDLE
        new new Splash\SonataAdminMonologBundle\SplashSonataAdminMonologBundle(),
        // ...
    );
}
```

Basic Configuration
-------------------

[](#basic-configuration)

Then, you can configure Monolog to use the Doctrine DBAL handler:

```
# app/config/config.yml # or any env
monolog:
    handlers:
        database_handler:
            type:         service
            id:           splash.sonata.admin.monolog.handler
            channels:     ["!event"]
```

Advanced Configuration
----------------------

[](#advanced-configuration)

If you don't want to use default Doctrine Entity Manager, you need to configure the Doctrine DBAL connection to use in the handler.

You have 2 ways to do that:

**By using an existing Doctrine connection:**

Note: we set the `logging` and `profiling` option to false to avoid DI circular reference.

```
# app/config/config.yml
doctrine:
    dbal:
        connections:
            default:
                ...
            monolog:
                driver:    pdo_sqlite
                dbname:    monolog
                path:      %kernel.root_dir%/cache/monolog2.db
                charset:   UTF8
                logging:   false
                profiling: false

splash_sonata_admin_monolog:
    doctrine:
        connection_name: monolog
```

**By creating a custom Doctrine connection for the bundle:**

```
# app/config/config.yml
splash_sonata_admin_monolog:
    doctrine:
        connection:
            driver:      pdo_sqlite
            driverClass: ~
            pdo:         ~
            dbname:      monolog
            host:        localhost
            port:        ~
            user:        root
            password:    ~
            charset:     UTF8
            path:        %kernel.root_dir%/db/monolog.db # The filesystem path to the database file for SQLite
            memory:      ~                               # True if the SQLite database should be in-memory (non-persistent)
            unix_socket: ~                               # The unix socket to use for MySQL
```

Please refer to the [Doctrine DBAL connection configuration](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#configuration) for more details.

Now your database is configured, you can generate the schema for your log entry table by running the following command:

```
php bin/console doctrine:schema:update --force

```

Translations
------------

[](#translations)

If you wish to use default translations provided in this bundle, make sure you have enabled the translator in your config:

```
# app/config/config.yml
framework:
    translator: ~
```

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

[](#contributing)

Any Pull requests are welcome!

This module is part of [SplashSync](http://www.splashsync.com) project.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

4

Last Release

3514d ago

Major Versions

v0.1.0 → v1.0.02015-05-29

### Community

Maintainers

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

---

Top Contributors

[![jeremyb](https://avatars.githubusercontent.com/u/134588?v=4)](https://github.com/jeremyb "jeremyb (40 commits)")[![BadPixxel](https://avatars.githubusercontent.com/u/8648419?v=4)](https://github.com/BadPixxel "BadPixxel (37 commits)")[![antspk](https://avatars.githubusercontent.com/u/78955792?v=4)](https://github.com/antspk "antspk (2 commits)")[![gilles-g](https://avatars.githubusercontent.com/u/377875?v=4)](https://github.com/gilles-g "gilles-g (1 commits)")[![samuelems](https://avatars.githubusercontent.com/u/26881719?v=4)](https://github.com/samuelems "samuelems (1 commits)")[![sdieunidou](https://avatars.githubusercontent.com/u/570763?v=4)](https://github.com/sdieunidou "sdieunidou (1 commits)")[![BlueTM](https://avatars.githubusercontent.com/u/662454?v=4)](https://github.com/BlueTM "BlueTM (1 commits)")[![florianlenz](https://avatars.githubusercontent.com/u/16626192?v=4)](https://github.com/florianlenz "florianlenz (1 commits)")

---

Tags

bundledoctrineSymfony2loggermonolog

### Embed Badge

![Health badge](/badges/splash-sonata-admin-monolog-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/splash-sonata-admin-monolog-bundle/health.svg)](https://phpackages.com/packages/splash-sonata-admin-monolog-bundle)
```

###  Alternatives

[lexik/monolog-browser-bundle

This Symfony2 bundle provides a Doctrine DBAL handler for Monolog and a web UI to display log entries

6257.8k](/packages/lexik-monolog-browser-bundle)[data-dog/audit-bundle

Audit bundle for symfony2 and doctrine orm, logs any database change

141901.7k1](/packages/data-dog-audit-bundle)[omines/datatables-bundle

Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support

2851.4M6](/packages/omines-datatables-bundle)[data-dog/pager-bundle

Paginator bundle for symfony2 and doctrine orm, allows customization with filters and sorters

11103.5k7](/packages/data-dog-pager-bundle)

PHPackages © 2026

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