Structured, namespaced logging built for the browser and Node.js. Worker transport keeps your main thread free. Child loggers, configurable timestamps, and flexible transports — all in ~10 KB with zero dependencies.
npm install konsole-loggeryarn add konsole-loggerpnpm add konsole-loggerConsole works in browser and Node.js. It automatically picks the best output format for each environment. In browsers, logs are stored in a circular buffer for DevTools inspection. In Node.js, disabled levels add zero overhead — no buffer, no allocations.
Measured on Apple M2 Max, Node.js v23, 100K iterations. Pino, Winston, and Bunyan are Node.js only — Console works in both browser and Node.js. Run npm run benchmark to reproduce.
| Scenario | Console | Pino | Winston | Bunyan |
|---|---|---|---|---|
| Silent / disabled | ~8M | ~7M | ~1.5M | — |
| JSON → /dev/null | ~650K | ~470K | ~270K | ~340K |
| Child (disabled) | ~17M | ~14M | ~2M | — |
| Browser + buffer | ~4.7M | — | — | — |
| With Worker | non-blocking | — | — | — |
| Console | Pino | Winston | Bunyan | |
|---|---|---|---|---|
| Bundle (gzip) | ~10 KB | ~32 KB | ~70 KB | ~45 KB |
| Install size | 86 KB | 1.17 MB | 360 KB | 212 KB |
| Dependencies | 0 | 11 | 11 | 0 |
Pino, Winston, and Bunyan are Node.js only. Console is the only structured logger that works in both browser and Node.js with worker offloading for non-blocking transport processing. See the Performance Guide for details.
Console has no framework dependency — it works everywhere: React, plain HTML, and Node.js servers.