Lightweight & ESM-only logger for NodeJS
  • TypeScript 99.6%
  • JavaScript 0.4%
Find a file
Andrés Correa Casablanca 97d2f8ee05
chore(logtau-egress): describe network sinks in package metadata
Signed-off-by: Andres Correa Casablanca <andreu@ctrlback.coop>
2026-07-12 19:00:12 +02:00
.hooks fix(logtau-worker): run the worker loop without a top-level await 2026-06-24 12:49:18 +02:00
packages chore(logtau-egress): describe network sinks in package metadata 2026-07-12 19:00:12 +02:00
.gitignore test(bench-vs-pino): off-thread transport comparison 2026-06-24 16:23:24 +02:00
.prototools chore: upgrade deps 2026-05-30 14:48:14 +02:00
LICENSE.md chore: package publishable metadata + MIT license 2026-05-30 00:09:11 +02:00
package.json fix(logtau-worker): run the worker loop without a top-level await 2026-06-24 12:49:18 +02:00
pnpm-lock.yaml chore(logtau-formats): scaffold package 2026-07-11 00:03:03 +02:00
pnpm-workspace.yaml chore(logtau-hono): scaffold package 2026-07-10 12:18:24 +02:00
README.md docs: list udp and gelf sinks in egress summaries 2026-07-12 18:20:00 +02:00

LogTau

A fast, ESM-only, structured logger for modern Node.js. Output is NDJSON, the public API is small, the hot path is designed to do as little work as possible, and the package has zero production dependencies.

This repository is a pnpm workspace. The core library is @ctrlback/logtau; a set of satellite packages add context propagation, framework adapters, extra destinations and output formats.

Requirements

  • Node.js >= 22.6
  • Pure ESM consumer (the packages are "type": "module" with no CJS export)

Quick start

pnpm add @ctrlback/logtau
import { createLogger, stdoutSink } from '@ctrlback/logtau'

const log = createLogger({ level: 'info', sink: stdoutSink() })

log.info('server started', { port: 3000 })
log.warn('rate limit nearing', { remaining: 12 })

The @ctrlback/logtau guide covers bindings, the category registry, sinks, redaction, record shaping and pluggable output formats.

Packages

Package What it gives you
@ctrlback/logtau Core structured logger: NDJSON output, category registry, redaction, pluggable formatters.
@ctrlback/logtau-context Propagate ambient fields across async boundaries with AsyncLocalStorage.
@ctrlback/logtau-hono Per-request child logger and access logs for Hono.
@ctrlback/logtau-drizzle Route Drizzle ORM query logs through logtau.
@ctrlback/logtau-egress Log destinations: files with rotation and compression, plus HTTP, TCP, TLS, and UDP network sinks (including GELF over UDP).
@ctrlback/logtau-formats Extra output formatters: logfmt and GELF.
@ctrlback/logtau-pretty Human-readable NDJSON, as a CLI or a Transform stream.
@ctrlback/logtau-worker Move log serialization and writing to a dedicated worker thread.

Benchmarks

A benchmark against pino lives in packages/bench-vs-pino/.