Loggable is able to track lifecycle modifications and log them using any third party log system.
<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model\Loggable\LoggableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\LoggableInterface;
/**
* @ORM\Entity
*/
class Category implements LoggableInterface
{
use LoggableTrait;
}
These messages are then passed to the configured logger.
You can define your own, by passing a class that implements Psr\Log\LoggerInterface
.