unstale

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

@unstale/cli on npm

@mastra/loggers 115 changes

Breaking changes 4

  • listLogs and listLogsByRunId reject invalid pagination values with a RangeError; zero values still default to page 1 and 100 per page.

    1.3.8release notes

  • Throws a clear error at construction when a directory is supplied as the log path.

    1.3.6release notes

  • Rejects with a MastraError when the log file cannot be read instead of returning an empty result; malformed lines are still skipped.

    1.3.6release notes

  • Rejects with a MastraError when the log file cannot be read instead of returning an empty result; malformed lines are still skipped.

    1.3.6release notes

New APIs and options 2

  • Adds a field that counts records dropped when the in-memory buffer is full.

    1.3.6release notes

  • Adds a positive-integer limit for unsent records kept in memory; it defaults to maxListLength or 10000 when trimming is off.

    1.3.6release notes

Behavior and default changes 2

  • Log batches are serialized once before sending, so serialization failures fail immediately and network retries resend the same payload.

    1.3.8release notes

  • Upstash log queries now retrieve records in bounded pages.

    1.3.6release notes

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.

    1.3.7release notes

  • Skips list entries that are not valid JSON, so log queries return only real records and snapshot totals exclude corrupt entries.

    1.3.7release notes

  • Reports failed log writes instead of silently treating them as successful and losing logs without notice.

    1.3.6release notes

  • HTTP and Upstash log queries and Upstash error results now report page 1 when called with page 0, consistent with other transports.

    1.3.6release notes

  • HTTP and Upstash log transports preserve supplied epoch-zero timestamps; logs without a time still receive the current time.

    1.3.6release notes

  • Sends only one request to Upstash at a time, preventing many writes during an outage from opening hundreds of requests.

    1.3.6release notes

  • Shutdown now sends every buffered batch.

    1.3.6release notes