npm / @mastra/loggers
@mastra/loggers
What changed in @mastra/loggers 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
4 breaking2 new APIs and options2 behavior and defaults7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@mastra/loggers 115 changes
Breaking changes 4
listLogsandlistLogsByRunIdreject invalid pagination values with aRangeError; zero values still default to page 1 and 100 per page.Throws a clear error at construction when a directory is supplied as the log path.
Rejects with a MastraError when the log file cannot be read instead of returning an empty result; malformed lines are still skipped.
Rejects with a MastraError when the log file cannot be read instead of returning an empty result; malformed lines are still skipped.
New APIs and options 2
Adds a field that counts records dropped when the in-memory buffer is full.
Adds a positive-integer limit for unsent records kept in memory; it defaults to maxListLength or 10000 when trimming is off.
Behavior and default changes 2
Log batches are serialized once before sending, so serialization failures fail immediately and network retries resend the same payload.
Upstash log queries now retrieve records in bounded pages.
Fixes and other changes 7
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.
Skips list entries that are not valid JSON, so log queries return only real records and snapshot totals exclude corrupt entries.
Reports failed log writes instead of silently treating them as successful and losing logs without notice.
HTTP and Upstash log queries and Upstash error results now report page 1 when called with page 0, consistent with other transports.
HTTP and Upstash log transports preserve supplied epoch-zero timestamps; logs without a time still receive the current time.
Sends only one request to Upstash at a time, preventing many writes during an outage from opening hundreds of requests.
Shutdown now sends every buffered batch.