PHPackages                             meyfarth/entity-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. meyfarth/entity-logger

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

meyfarth/entity-logger
======================

Allows to automatically log entities modification

v1.0.0(11y ago)034MITPHPPHP &gt;=5.3.3

Since Sep 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Meyfarth/entity-logger)[ Packagist](https://packagist.org/packages/meyfarth/entity-logger)[ Docs](https://github.com/Meyfarth/entity-logger)[ RSS](/packages/meyfarth-entity-logger/feed)WikiDiscussions master Synced 1mo ago

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

entity-logger
=============

[](#entity-logger)

*By Sébastien Garcia*

This bundle allows you to log every modification made to your entities, just by implementing the `EntityLoggerInterface` interface.

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

[](#installation)

Using Composer:

```
php composer.phar require meyfarth/entity-logger dev-master

```

Enable the bundle in your kernel :

```
// app/AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new \Meyfarth\EntityLoggerBundle\MeyfarthEntityLoggerBundle(),
        );

        ...

        return $bundles;
    }
```

Update your database :

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

```

This will create a `meyfarth_entity_log` table. You can dump your database first using `--dump-sql` option if you want to know the table structure.

Usage
-----

[](#usage)

To log an entity, implement the `EntityLoggerInterface` interface in the entities you want to log :

```
