tbaronnat/log-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tbaronnat/log-bundle

最新稳定版本:v1.0.3

Composer 安装命令:

composer require tbaronnat/log-bundle

包简介

Simple log bundle system with Symfony integration

README 文档

README

How to use
  • Add LoggableInterface to each entity you want to log
  • Create your own instance of LogManager, extending LogManager or AbstractLogManager of this bundle if needed to add more data to LogObject, or to configure another way to exclude fields if you want
  • Create your own Log.php Entity who extends of AbstractLog and implements LogInterface
  • Create a Repository associated to your entity, and put LogRepositoryTrait inside, or use LogRepository on this file
  • Your current User class should implements LogCreatorInterface
  • Display logs:
Excluded fields annotation

Use Doctrine annotation @LogExcludedField to exclude a specific field to log in your entity

    /**
     * @LogExcludedField()
     * @ORM\Column(name="excluded_field", type="string", length=255, nullable=true)
     */
    protected ?string $excludedField = null;
Exemples:

Display all logs depending on specifics classes, for one user.

    {% include '@TBaronnatLog/logs/_display_classes_user_log.html.twig' with {
        'classes': ['App\\Entity\\User', 'App\\Entity\\Documents'],
        'user': resource.user
    } %}
    {% if resource is not null and resource.id is not null %}
        {% include '@TBaronnatLog/logs/_display_resource_log.html.twig' with {
            'resource': resource
        } %}
    {% endif %}
    {% include '@TBaronnatLog/logs/_display_resources_log.html.twig' with {
        'resources':  resources,
        'logClasses': ['App\\Entity\\Documents']
    } %}

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固