unstale

npm / @mastra/loggers

@mastra/loggers

What changed in @mastra/loggers 0.10 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

7 breaking2 security10 new APIs and options2 performance4 behavior and defaults22 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 146 changes

Breaking changes 6

  • 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

  • Requires batchSize and maxBufferSize to be positive integers; invalid values now cause the constructor to throw.

    1.3.5release notes

  • Removed the component field from pino-pretty log output to reduce noise in CLI logs.

    1.1.1release notes

  • The minimum required Node.js version is now 22.13.0.

    1.0.0release notes

Security 2

  • Publishes clean versions and moves the latest dist-tag forward, superseding compromised versions that declared the malicious easy-day-js dependency.

    1.1.3release notes

  • PinoLogger exposes Pino’s native redact option to automatically redact sensitive data from logs.

    1.0.0release notes

New APIs and options 10

  • 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

  • Adds a method to report how many logs were dropped by the transport.

    1.3.5release notes

  • Caps the log buffer at a default of 10,000 entries; when full, the oldest logs are dropped first.

    1.3.5release notes

  • A new serializers option lets you override or extend the default serializers.

    1.3.1release notes

  • Added the messageKey option to emit log messages under the message field expected by structured-log aggregators.

    1.1.2release notes

  • PinoLogger accepts customLevels to define custom log levels and match an existing Pino logging setup.

    1.1.0release notes

  • PinoLogger accepts mixin to attach shared fields, such as trace IDs, request IDs, or service metadata, to every log entry.

    1.1.0release notes

  • The new prettyPrint option switches output to single-line JSON for log aggregators instead of multiline colored output.

    1.0.3release notes

  • PinoLogger gains a child() method for creating child loggers with bound context.

    1.0.0release notes

Performance 2

  • FileTransport queries now read the log file as a stream, avoiding event-loop blocking and keeping paginated queries limited to the requested page in memory.

    1.3.5release notes

  • CHANGELOG.md is no longer included in distributed npm files, reducing package size.

    1.3.1release notes

Behavior and default changes 4

  • 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

  • PinoLogger implements the Mastra logger adapter contract and injects trace_id and span_id into native log records during traced operations, preserving user mixin fields unless they conflict with trace fields.

    1.3.0release notes

  • The package is marked as stable.

    1.0.0release notes

Fixes and other changes 22

  • When maxListLength is positive, filtered queries, listLogsByRunId, and reads with returnPaginationResults: false now return at most the newest maxListLength entries instead of reading the entire Redis log list.

    1.3.11release notes

  • Fixed a TypeScript error when using the mixin option with pino 10.4 or newer; the option type is unchanged.

    1.3.10release notes

  • Idle transports no longer keep scripts and command-line tools running after their work is done, so they exit without calling destroy(); buffered logs still keep the process running until sent.

    1.3.9release notes

  • Logs are retained and retried when Redis rejects a push, with errors reported including to the destroy callback; trim failures are reported without resending already-pushed logs.

    1.3.9release notes

  • 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

  • Sends only one flush request at a time, avoiding a new failing request for every log written during an outage.

    1.3.5release notes

  • Stops retrying invalid batches, drops them, and counts them with getDroppedLogCount(), so newer logs are not stuck behind them.

    1.3.5release notes

  • Destroying the transport now sends every buffered batch before finishing.

    1.3.5release notes

  • Finds matching logs beyond the first 100 records.

    1.3.5release notes

  • Waits for the duration specified by the server's Retry-After header before retrying, up to the request timeout.

    1.3.5release notes

  • FileTransport log queries now skip malformed lines and still return valid logs instead of returning no logs when a file contains a malformed line.

    1.3.4release notes

  • Setting exponentialBackoff: false now uses a constant delay between retries instead of being ignored.

    1.3.3release notes

  • Explicit maxRetries: 0 now makes a single request instead of being ignored.

    1.3.3release notes

  • Explicit retryDelay: 0 now retries immediately instead of being ignored.

    1.3.3release notes

  • The Upstash logger now trims the log list according to maxListLength, preventing unbounded growth and unreadable entries in listLogs().

    1.3.3release notes

  • Errors logged under the error key are now serialized with their type, message, and stack; non-error-like values pass through, and error-like plain objects preserve their own fields.

    1.3.1release notes

@mastra/loggers 0.101 changes

Breaking changes 1

  • Peer dependencies were updated to match the core package version bump, affecting package compatibility requirements.

    0.10.16release notes