AdminAuditLogger
public class AdminAuditLogger
源码Source
io/agentscope/spring/boot/admin/audit/AdminAuditLogger.java:31–64管理台 Audit 日志记录器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.audit 包。核心成员包括 record、AdminAuditLogger。
Default audit sink: logs at INFO via SLF4J and (optionally) republishes the record as a Spring
ApplicationEvent so other components can subscribe with @EventListener.
Replace with a custom AdminAuditLogger bean to ship records to RocketMQ, Loki, or a
compliance pipeline.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public AdminAuditLogger(AdminProperties properties, ApplicationEventPublisher publisher) | 初始化 `AdminAuditLogger` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void record(String commandId, String operator, String target, boolean writes, String outcome, Map<String, Object> attributes) | 执行记录相关操作。 Performs the record operation. |
构造器详情Constructor Detail
AdminAuditLogger
public AdminAuditLogger(AdminProperties properties, ApplicationEventPublisher publisher)
初始化 AdminAuditLogger 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
properties | AdminProperties | 属性(类型 `AdminProperties`)。The properties. |
publisher | ApplicationEventPublisher | publisher(类型 `ApplicationEventPublisher`)。The publisher. |
源码Source
io/agentscope/spring/boot/admin/audit/AdminAuditLogger.java:38–41方法详情Method Detail
record
public void record(String commandId, String operator, String target, boolean writes, String outcome, Map<String, Object> attributes)
执行记录相关操作。
Performs the record operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
commandId | String | 命令标识(类型 `String`)。The command id. |
operator | String | operator(类型 `String`)。The operator. |
target | String | 目标(类型 `String`)。The target. |
writes | boolean | writes(类型 `boolean`)。The writes. |
outcome | String | outcome(类型 `String`)。The outcome. |
attributes | Map<String, Object> | 属性(类型 `Map`)。The attributes. |
源码Source
io/agentscope/spring/boot/admin/audit/AdminAuditLogger.java:43–63