Skip to main content

Mastra.getLogger()

.getLogger() 方法用于获取在 Mastra 实例中配置的日志记录器实例。

🌐 The .getLogger() method is used to retrieve the logger instance that has been configured in the Mastra instance.

使用示例
Direct link to 使用示例

🌐 Usage example

mastra.getLogger();

参数
Direct link to 参数

🌐 Parameters

此方法不接受任何参数。

🌐 This method does not accept any parameters.

返回
Direct link to 返回

🌐 Returns

logger:

TLogger
The configured logger instance used for logging across all components (agents, workflows, etc.).

🌐 Related