AS AgentScopeAPI 手册 / API Reference

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
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
publisherApplicationEventPublisherpublisher(类型 `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
commandIdString命令标识(类型 `String`)。The command id.
operatorStringoperator(类型 `String`)。The operator.
targetString目标(类型 `String`)。The target.
writesbooleanwrites(类型 `boolean`)。The writes.
outcomeStringoutcome(类型 `String`)。The outcome.
attributesMap<String, Object>属性(类型 `Map`)。The attributes.
源码Source io/agentscope/spring/boot/admin/audit/AdminAuditLogger.java:43–63
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.