alexjose/audit-log
最新稳定版本:v2.0.4
Composer 安装命令:
composer require alexjose/audit-log
包简介
Log audits events
README 文档
README
AuditLog - Log audit events using the Monolog
This library aims to log the critical changes happening in the application. This tracks the changes and the source of the events.
Installation
composer require alexjose/audit-log
Basic Usage
$auditLog = new AuditLog(); $auditLog->log([ 'New User Registerd', 'User', 'creation', 1, 'user', 'alex@example.com', [ 'username' => 'john', 'email' => 'john@example.com' ], null, 1, 'user', 'alex@example.com', ]);
Signature of log()
log() will accept an instance of Event or an array with the attributes of the Event.
/** * @param Event|array $event */ public function log($event): void
Signature of new Event()
/** * @param string $message The title of the log * @param string $event The unique name of event * @param string $entityId The id of the entity which got modified * @param string $entityType The type to entity which got modified * @param string $entityTitle The title of the entity which got modified * @param array $newValues The new values of the entity * @param array|null $oldValues The old values of the entity * @param string $userId The id of the user who made the change * @param string $userType The type of the user who made the change * @param string $username The username of the user who made the change */ public function __construct( $message, $module, $event, $entityId, $entityType, $entityTitle, $newValues, $oldValues, $userId, $userType, $username ):void
统计信息
- 总下载量: 2.36k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-25