beutsing/log-entry-bundle
Composer 安装命令:
composer require beutsing/log-entry-bundle
包简介
Recording of user activities.
README 文档
README
Description
The Beutsing LogEntry Bundle allows you to easily record user actions in your Symfony application.
Every significant action (creation, modification, deletion, etc.) can be automatically or manually logged in a log_entries table.
This bundle uses Doctrine ORM to persist logs and can be integrated into any Symfony 6, 7, or 8 project.
Installation
- Install the bundle via Composer:
composer require beutsing/log-entry-bundle
- Create the migration for the log_entry table:
php bin/console make:migration php bin/console doctrine:migrations:migrate
Symfony will generate a migration file like Version20260309XXXXXX.php (depending on the date and time), which will create the log_entry table in your database.
- LogEntry Table Fields
The log_entry table includes the following fields:
Field |
Description |
|---|---|
| id | Unique identifier of the log |
| userIdentifier | Identifier of the user (email, username, etc.) |
| companyid (string) | Optional company identifier |
| action (string) | Action performed by the user |
| message (text) | Descriptive message related to the action |
| createdAt (datetime) | Date and time of log creation |
- The bundle provides a service to easily create log entries. Example usage:
<?php use Beutsing\LogEntryBundle\Service\LogEntryService; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class SomeController extends AbstractController { public function someAction(LogEntryService $logService) { $logService->log( 'CREATE_USER', 'A new user has been created', 'COMPANY123' ); return $this->json(['status' => 'ok']); } }
Notes
The log service can be injected in any controller or service using Symfony's autowiring.
The createdAt field is automatically set when a log entry is created.
The userIdentifier field is automatically filled with the identifier of the currently authenticated user (email, username, etc.).
If you run composer update beutsing/log-entry-bundle to update the bundle, you must also execute the migration commands to update your database:
php bin/console make:migration php bin/console doctrine:migrations:migrate
beutsing/log-entry-bundle 适用场景与选型建议
beutsing/log-entry-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 beutsing/log-entry-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 beutsing/log-entry-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-18