Structured Logging

for Every Runtime

Zero-dependency TypeScript logging with auto PII sanitization, native tracing, and seamless context propagation. Works in Bun, Node, Edge, and browsers.

bun add vestig
vestig — live logs
streaming
0
Deps
<5KB
Gzipped
TS
Native

Everything You Need

A complete logging solution designed for modern TypeScript applications.

Popular

Auto PII Sanitization

Automatically detects and redacts sensitive data like passwords, emails, credit cards, and API keys. GDPR & HIPAA friendly.

Learn more

Zero Dependencies

No external dependencies means tiny bundle sizes (<5KB gzipped) and no supply chain risks. Just pure TypeScript.

See benchmarks

Multi-Runtime

Works seamlessly in Bun, Node.js, Deno, Edge runtimes (Vercel, Cloudflare), and browsers with automatic runtime detection.

New

Native Tracing

Built-in distributed tracing with span(), startSpan(), and automatic context propagation. No OpenTelemetry overhead.

Context Propagation

AsyncLocalStorage-based context that flows through your entire request lifecycle. Correlation IDs, user context, and more.

New

Smart Sampling

Probability, rate-limit, and namespace-based sampling strategies to control log volume without losing important data.

Type-Safe

Full TypeScript support with strict typing for metadata, context, and configuration. IDE autocomplete and compile-time checks.

How Vestig Compares

See how Vestig stacks up against other popular logging libraries in terms of features and bundle size.

FeatureVestigPinoWinstonBunyan
Bundle Size (gzip)<5KB~25KB~80KB~45KB
Dependencies0384
TypeScript
Auto PII Sanitization
Native Tracing
Context PropagationPluginPlugin
Edge RuntimePartial
Browser Supportpino-browserwinston-browser
Structured Logging
SamplingPlugin

Bundle sizes measured with esbuild minify + gzip. Feature comparisons as of Dec 2024.