# 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)