Class LoggerUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRecords DEBUG level log informationstatic voidRecords ERROR level log informationstatic voidRecords INFO level log informationstatic voidlogA2aClientEventDetail(org.slf4j.Logger logger, io.a2a.client.ClientEvent event) Logs detailed information of A2A client events to the logstatic voidlogAgentEventDetail(org.slf4j.Logger logger, io.agentscope.core.agent.Event event) Logs detail information of AgentScope events output from Agent.static voidlogTextMsgDetail(org.slf4j.Logger logger, List<io.agentscope.core.message.Msg> msgs) Logs detailed information about the text content in a list of messagesstatic voidRecords TRACE level log informationstatic voidRecords WARN level log information
-
Constructor Details
-
LoggerUtil
public LoggerUtil()
-
-
Method Details
-
logAgentEventDetail
public static void logAgentEventDetail(org.slf4j.Logger logger, io.agentscope.core.agent.Event event) Logs detail information of AgentScope events output from Agent.- Parameters:
logger- The Logger instance used for loggingevent- The event object to be logged from AgentScope Agent.
-
logA2aClientEventDetail
public static void logA2aClientEventDetail(org.slf4j.Logger logger, io.a2a.client.ClientEvent event) Logs detailed information of A2A client events to the log- Parameters:
logger- The Logger instance used for loggingevent- The client event object to be logged
-
logTextMsgDetail
public static void logTextMsgDetail(org.slf4j.Logger logger, List<io.agentscope.core.message.Msg> msgs) Logs detailed information about the text content in a list of messages- Parameters:
logger- The Logger instance used for loggingmsgs- The list of message objects containing content to be logged
-
trace
Records TRACE level log informationThis method first checks whether the logger has TRACE level enabled, and if so, records the formatted log information. This avoids unnecessary string formatting operations when the log level is not enabled, improving performance.
- Parameters:
logger- The logger instance used to perform the actual logging operationformat- The format string for the log message, following the format specification of SLF4Jargs- The parameter array used to replace placeholders in the format string
-
debug
Records DEBUG level log informationThis method first checks whether the logger has DEBUG level enabled, and if so, records the formatted log information. This avoids unnecessary string formatting operations when the log level is not enabled, improving performance.
- Parameters:
logger- The logger instance used to perform the actual logging operationformat- The format string for the log message, following the format specification of SLF4Jargs- The parameter array used to replace placeholders in the format string
-
info
Records INFO level log informationThis method first checks whether the logger has INFO level enabled, and if so, records the formatted log information. This avoids unnecessary string formatting operations when the log level is not enabled, improving performance.
- Parameters:
logger- The logger instance used to perform the actual logging operationformat- The format string for the log message, following the format specification SLF4Jargs- The parameter array used to replace placeholders in the format string
-
warn
Records WARN level log informationThis method first checks whether the logger has WARN level enabled, and if so, records the formatted log information. This avoids unnecessary string formatting operations when the log level is not enabled, improving performance.
- Parameters:
logger- The logger instance used to perform the actual logging operationformat- The format string for the log message, following the format specification SLF4Jargs- The parameter array used to replace placeholders in the format string
-
error
Records ERROR level log informationThis method first checks whether the logger has ERROR level enabled, and if so, records the formatted log information. This avoids unnecessary string formatting operations when the log level is not enabled, improving performance.
- Parameters:
logger- The logger instance used to perform the actual logging operationformat- The format string for the log message, following the format specification SLF4Jargs- The parameter array used to replace placeholders in the format string
-