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
Direct link to Usage example

mastra.getLogger()

Parameters
Direct link to Parameters

This method doesn't accept any parameters.

Returns
Direct link to Returns

logger:

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