Blazing Fast
25M+ ops/sec with optimized hot paths and zero-overhead level filtering. Faster than Pino and Winston.
Ultra-lightweight, universal, and production-ready logging for all runtimes
npm install @sylphx/catbun add @sylphx/catpnpm add @sylphx/catimport { createLogger, consoleTransport, prettyFormatter } from '@sylphx/cat'
const logger = createLogger({
level: 'info',
formatter: prettyFormatter(),
transports: [consoleTransport()]
})
logger.info('Hello world!', { user: 'kyle' })Auto-redact sensitive data with glob patterns and PII detection:
import { redactionPlugin } from '@sylphx/cat'
const logger = createLogger({
plugins: [
redactionPlugin({
fields: ['password', '*.secret', '**.apiKey'],
redactPII: true, // Credit cards, SSNs, emails
preventLogInjection: true
})
]
})Full OTLP export and W3C Trace Context support:
import { otlpTransport, tracingPlugin } from '@sylphx/cat'
const logger = createLogger({
transports: [
otlpTransport({
endpoint: 'https://otlp-gateway.grafana.net/otlp/v1/logs',
resourceAttributes: {
'service.name': 'my-api',
'service.version': '1.0.0'
}
})
],
plugins: [tracingPlugin()]
})
// Sends to Grafana, Datadog, New Relic, AWS CloudWatch, etc.Smart sampling saves 40-90% on costs while keeping 100% of errors:
import { tailSamplingPlugin } from '@sylphx/cat'
const logger = createLogger({
plugins: [
tailSamplingPlugin({
adaptive: true,
monthlyBudget: 10 * 1024 * 1024 * 1024 // 10 GB/month
})
]
})
// Automatically keeps all errors, slow requests, 5xx responses
// Samples only 1% of successful requests| Feature | @sylphx/cat | Pino | Winston |
|---|---|---|---|
| Bundle Size | 8.93 KB | 11 KB | 80 KB |
| Performance | 25M ops/s | 15M ops/s | 5M ops/s |
| Zero Dependencies | â | â | â |
| Universal | â | â | â |
| OpenTelemetry | â | Partial | â |
| W3C Trace Context | â | â | â |
| OWASP Compliant | â | â | â |
| Tail Sampling | â | â | â |
| TypeScript-First | â | â | â ïļ |
@sylphx/cat powers logging for production systems handling millions of requests per day.