Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@mastra/loggers

Latest version: v0.0.0-vault-gh-token-20261124202825

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: abhiaiyer, calcsam, dschau, nikaiyer, rase-, smthomas, tylerbarnes, wardpeet
29,787 Stars
3,132 Forks
142 Versions
5.9M Downloads
TypeScript Repo language

Scan summary

@mastra/loggers was last scanned on 24 Nov 2026 at version 0.0.0-vault-gh-token-20261124202825. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 142 versions; the latest 5 were published within 6 days (19–24 Nov 2026).
  • Findings: No rules fired in version 0.0.0-vault-gh-token-20261124202825.
  • Downloads: 5,923,409 downloads.

Versions

142 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.0.0-vault-gh-token-20261124202825 LATEST 24 Nov 2026 No rules fired
0.0.0-doctor-native-engine-20261124200957 24 Nov 2026 No rules fired
1.3.12-alpha.0 23 Nov 2026 No rules fired
0.0.0-gh-factory-comments-20261119225016 19 Nov 2026 Not shown
0.0.0-yujohn-obs-967-read-widget-projectid-from-the-opened-20261119201438 19 Nov 2026 Not shown

No rules fired in 0.0.0-vault-gh-token-20261124202825

Findings

Findings for v0.0.0-vault-gh-token-20261124202825. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.0.0-vault-gh-token-20261124202825; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@mastra/loggers

Logger and logging transport implementations for Mastra. The package includes a structured Pino logger plus file, HTTP, and Upstash transports that extend LoggerTransport from @mastra/core/logger.

Installation

npm install @mastra/loggers

Usage

Create a logger with one or more named transports and pass it to Mastra:

import { Logger } from '@mastra/core/logger';
import { Mastra } from '@mastra/core/mastra';
import { FileTransport } from '@mastra/loggers/file';
import { UpstashTransport } from '@mastra/loggers/upstash';

const logger = new Logger({
  transports: [
    new FileTransport({ path: '/var/log/my-app.log' }),
    new UpstashTransport({
      upstashUrl: process.env.UPSTASH_URL!,
      upstashToken: process.env.UPSTASH_TOKEN!,
    }),
  ],
});

export const mastra = new Mastra({ logger });

Documentation

Logger

Logger combines one or more LoggerTransport implementations and can be passed directly to the Mastra configuration. It supports standard log levels and sends each structured log record to the configured transports, which can persist, batch, or forward the data to external systems.

File transport

FileTransport appends structured logs to an existing local file. It can list logs, query by run ID, stream records, and clean up the underlying write stream when destroyed.

import { FileTransport } from '@mastra/loggers/file';

const fileTransport = new FileTransport({ path: '/var/log/my-app.log' });
const runLogs = await fileTransport.listLogsByRunId({ runId: 'run-123' });
Upstash transport

UpstashTransport batches logs into an Upstash Redis list. Configure the instance URL and token, then optionally set the list name, maximum retained list length, batch size, and flush interval. It trims old records, retries failed batches, and performs a final flush during shutdown.

import { UpstashTransport } from '@mastra/loggers/upstash';

const upstashTransport = new UpstashTransport({
  upstashUrl: process.env.UPSTASH_URL!,
  upstashToken: process.env.UPSTASH_TOKEN!,
  listName: 'application-logs',
  maxListLength: 10_000,
  batchSize: 100,
  flushInterval: 10_000,
});
HTTP transport

HttpTransport sends batches of structured log records to an HTTP endpoint and supports request headers, batching, retry, and flush configuration. Use it for application-specific collectors and hosted logging gateways.

Logs wait in an in-memory buffer until they are sent. maxBufferSize caps that buffer so an unreachable endpoint can't exhaust memory. It defaults to 10,000 records and is never lower than batchSize. When the buffer is full, the oldest records are dropped first; getDroppedLogCount() returns how many were dropped. batchSize and maxBufferSize must be positive integers, otherwise the constructor throws.

import { HttpTransport } from '@mastra/loggers/http';

const httpTransport = new HttpTransport({
  url: 'https://logs.example.com/ingest',
  headers: { Authorization: `Bearer ${process.env.LOG_TOKEN}` },
  batchSize: 100,
  flushInterval: 10_000,
  maxBufferSize: 5_000,
});

const droppedLogs = httpTransport.getDroppedLogCount();

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @mastra/loggers

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229