Skip to main content

jslog

Structured logging for Node.js that makes Go's log/slog look basic

Go slog API in Node.js

Full API compatibility with Go's log/slog. If you know Go's slog, you already know jslog. Familiar patterns, same mental model.

20+ Advanced Features

File rotation, buffering, sampling, filtering, async handlers, middleware, metrics, and more! Everything Go slog has, plus features it doesn't.

Production Ready

Built for production with TypeScript support, zero dependencies, and performance in mind. Easy to debug in development, powerful in production.

Structured Logging

Key-value attributes for machine-parseable logs. Perfect for log aggregators like Elasticsearch, Splunk, or any JSON-based system.

Colorful Development

Beautiful ANSI color-coded console output with ColorHandler. Make your development logs easy to read and debug.

Type Safe

Full TypeScript support with complete type safety and IntelliSense. Catch errors at compile time, not runtime.