Skip to main content

Mastra.getLogger()

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

Usage example

mastra.getLogger();

Parameters

This method does not accept any parameters.

Returns

logger:

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

On this page