LoggerUtil
public class LoggerUtil
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:30–171日志记录器 Util,支持智能体之间的发现、委派与协作。位于 io.agentscope.core.a2a.agent.utils 包。核心成员包括 logAgentEventDetail、logA2aClientEventDetail、logTextMsgDetail、trace、debug、info。
A2A agent logger util.
方法摘要Method Summary
方法详情Method Detail
logAgentEventDetail
public static void logAgentEventDetail(Logger logger, Event event)
执行日志智能体事件详情相关操作。
Logs detail information of AgentScope events output from Agent.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The Logger instance used for logging |
event | Event | 事件(类型 `Event`)。The event object to be logged from AgentScope Agent. |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:38–43logA2aClientEventDetail
public static void logA2aClientEventDetail(Logger logger, ClientEvent event)
执行日志 A 2 a 客户端事件详情相关操作。
Logs detailed information of A2A client events to the log
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The Logger instance used for logging |
event | ClientEvent | 事件(类型 `ClientEvent`)。The client event object to be logged |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:51–59logTextMsgDetail
public static void logTextMsgDetail(Logger logger, List<Msg> msgs)
执行日志文本消息详情相关操作。
Logs detailed information about the text content in a list of messages
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The Logger instance used for logging |
msgs | List<Msg> | 消息列表(类型 `List`)。The list of message objects containing content to be logged |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:67–80trace
public static void trace(Logger logger, String format, Object... args)
执行追踪相关操作。
Records TRACE level log information This method first checks whether the logger has TRACE level enabled, and if so, records the formatted log information.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The logger instance used to perform the actual logging operation |
format | String | 格式(类型 `String`)。The format string for the log message, following the format specification of SLF4J |
args varargs | Object... | 参数(类型 `Object...`)。The parameter array used to replace placeholders in the format string |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:94–98debug
public static void debug(Logger logger, String format, Object... args)
执行 debug 方法。
Records DEBUG level log information This method first checks whether the logger has DEBUG level enabled, and if so, records the formatted log information.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The logger instance used to perform the actual logging operation |
format | String | 格式(类型 `String`)。The format string for the log message, following the format specification of SLF4J |
args varargs | Object... | 参数(类型 `Object...`)。The parameter array used to replace placeholders in the format string |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:112–116info
public static void info(Logger logger, String format, Object... args)
执行信息相关操作。
Records INFO level log information This method first checks whether the logger has INFO level enabled, and if so, records the formatted log information.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The logger instance used to perform the actual logging operation |
format | String | 格式(类型 `String`)。The format string for the log message, following the format specification SLF4J |
args varargs | Object... | 参数(类型 `Object...`)。The parameter array used to replace placeholders in the format string |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:130–134warn
public static void warn(Logger logger, String format, Object... args)
执行 warn 方法。
Records WARN level log information This method first checks whether the logger has WARN level enabled, and if so, records the formatted log information.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The logger instance used to perform the actual logging operation |
format | String | 格式(类型 `String`)。The format string for the log message, following the format specification SLF4J |
args varargs | Object... | 参数(类型 `Object...`)。The parameter array used to replace placeholders in the format string |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:148–152error
public static void error(Logger logger, String format, Object... args)
执行错误相关操作。
Records ERROR level log information This method first checks whether the logger has ERROR level enabled, and if so, records the formatted log information.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logger | Logger | 日志记录器(类型 `Logger`)。The logger instance used to perform the actual logging operation |
format | String | 格式(类型 `String`)。The format string for the log message, following the format specification SLF4J |
args varargs | Object... | 参数(类型 `Object...`)。The parameter array used to replace placeholders in the format string |
io/agentscope/core/a2a/agent/utils/LoggerUtil.java:166–170