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 vestigEverything You Need
A complete logging solution designed for modern TypeScript applications.
Auto PII Sanitization
Automatically detects and redacts sensitive data like passwords, emails, credit cards, and API keys. GDPR & HIPAA friendly.
Zero Dependencies
No external dependencies means tiny bundle sizes (<5KB gzipped) and no supply chain risks. Just pure TypeScript.
Multi-Runtime
Works seamlessly in Bun, Node.js, Deno, Edge runtimes (Vercel, Cloudflare), and browsers with automatic runtime detection.
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.
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.
| Feature | Vestig | Pino | Winston | Bunyan |
|---|---|---|---|---|
| Bundle Size (gzip) | <5KB | ~25KB | ~80KB | ~45KB |
| Dependencies | 0 | 3 | 8 | 4 |
| TypeScript | ||||
| Auto PII Sanitization | ||||
| Native Tracing | ||||
| Context Propagation | Plugin | Plugin | ||
| Edge Runtime | Partial | |||
| Browser Support | pino-browser | winston-browser | ||
| Structured Logging | ||||
| Sampling | Plugin |
Bundle sizes measured with esbuild minify + gzip. Feature comparisons as of Dec 2024.
Dive Into the Docs
Comprehensive documentation to get you started quickly.