assoconnect/log-bundle

2.1.2 2024-03-05 08:54 UTC

README

Build Status Quality Gate Status

安装

composer require assoconnect/log-bundle

描述

此Symfony扩展包提供了一个系统,每当一个完全由Doctrine管理的实体被持久化、更新或删除时,都会创建一个Log实体。

需要实现Log实体和LogFactoryInterface。

可以使用包含和排除实体的系统来决定哪些实体需要被记录。

Log.yaml格式

log:
    log_filters:
        includedEntities: ['App\Entity\includedEntity1', 'App\Entity\includedEntity2']
        excludeEntities: ['App\Entity\excludedEntity1', 'App\Entity\excludedEntity2']

如果两个列表都为空,则记录所有实体。如果仅包含实体列表为空,则记录所有内容,除非处理的实体是exclude列表中至少一个元素的实例或子类。

如果仅排除实体列表为空,则仅记录实例或子类至少包含列表中一个元素的实体。

如果两个列表都不为空,则实体必须是一个包含列表中至少一个元素的实例或子类,并且不是一个排除列表中至少一个元素的实例或子类。