@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
22 lines (13 loc) • 535 B
Markdown
# Mastra.getLogger()
The `.getLogger()` method is used to retrieve the logger instance that has been configured in the Mastra instance.
## Usage example
```typescript
mastra.getLogger()
```
## Parameters
This method doesn't accept any parameters.
## Returns
**logger** (`TLogger`): The configured logger instance used for logging across all components (agents, workflows, etc.).
## Related
- [Logging overview](https://mastra.ai/docs/observability/logging)
- [Logger reference](https://mastra.ai/reference/logging/pino-logger)