Lightweight & ESM-only logger for NodeJS
  • TypeScript 99.6%
  • JavaScript 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andrés Correa Casablanca a46426a290
All checks were successful
Tests / checks (pull_request) Successful in 1m25s
Tests / checks (push) Successful in 1m25s
fix: mutation testing works again under ts7
Signed-off-by: Andres Correa Casablanca <andreu@ctrlback.coop>
2026-10-29 01:23:51 +01:00
.forgejo/workflows ci: enable automated tests in ci 2026-10-29 00:53:05 +01:00
.hooks ci: enable automated tests in ci 2026-10-29 00:53:05 +01:00
packages fix: mutation testing works again under ts7 2026-10-29 01:23:51 +01:00
.gitignore test(bench-vs-pino): off-thread transport comparison 2026-06-24 16:23:24 +02:00
.prototools ci: enable automated tests in ci 2026-10-29 00:53:05 +01:00
LICENSE.md chore: package publishable metadata + MIT license 2026-05-30 00:09:11 +02:00
package.json build: update refs 2026-10-29 00:42:50 +01:00
pnpm-lock.yaml fix: mutation testing works again under ts7 2026-10-29 01:23:51 +01:00
pnpm-workspace.yaml feat(logtau-astro): astro logger adapter 2026-08-16 22:34:56 +02:00
README.md feat!: change namespace (ctrlback -> kindspells) 2026-10-29 01:15:17 +01: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 @kindspells/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 @kindspells/logtau
import { createLogger, stdoutSink } from '@kindspells/logtau'

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

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

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

Packages

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

Benchmarks

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

License

Created and maintained by KindSpells Labs.

Distributed under MIT License.