# What changed in @mastra/loggers

> 15 changes in @mastra/loggers 1 from its official release notes, upgrade guides and advisories: 4 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/@mastra/loggers/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @mastra/loggers 1

### Breaking changes

- `listLogs` and `listLogsByRunId` reject invalid pagination values with a `RangeError`; zero values still default to page 1 and 100 per page. (1.3.8) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#138)
- Throws a clear error at construction when a directory is supplied as the log path. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- Rejects with a MastraError when the log file cannot be read instead of returning an empty result; malformed lines are still skipped. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- Rejects with a MastraError when the log file cannot be read instead of returning an empty result; malformed lines are still skipped. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)

### New APIs and options

- Adds a field that counts records dropped when the in-memory buffer is full. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- Adds a positive-integer limit for unsent records kept in memory; it defaults to maxListLength or 10000 when trimming is off. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)

### Behavior and default changes

- Log batches are serialized once before sending, so serialization failures fail immediately and network retries resend the same payload. (1.3.8) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#138)
- Upstash log queries now retrieve records in bounded pages. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)

### Fixes and other changes

- Adds a missing timestamp to a copy of the log record instead of modifying the caller's object, allowing frozen records to be sent without a TypeError. (1.3.7) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#137)
- Skips list entries that are not valid JSON, so log queries return only real records and snapshot totals exclude corrupt entries. (1.3.7) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#137)
- Reports failed log writes instead of silently treating them as successful and losing logs without notice. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- HTTP and Upstash log queries and Upstash error results now report page 1 when called with page 0, consistent with other transports. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- HTTP and Upstash log transports preserve supplied epoch-zero timestamps; logs without a time still receive the current time. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- Sends only one request to Upstash at a time, preventing many writes during an outage from opening hundreds of requests. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
- Shutdown now sends every buffered batch. (1.3.6) — [release notes](https://github.com/mastra-ai/mastra/blob/a15924e709dd5d9439a6c102901c326ab0ec77fb/packages/loggers/CHANGELOG.md#136)
