# LoggerJS Full LLM Context
> Expanded LoggerJS documentation context generated from repository Markdown sources.
# Repository README
Source: https://github.com/jskits/loggerjs/blob/main/README.md
# LoggerJS
**A faster, more powerful isomorphic logger. Collect, process, deliver — one fast pipeline.**
[](https://github.com/jskits/loggerjs/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/@loggerjs/core)
[](LICENSE)
[](tsconfig.base.json)
[](packages/core/package.json)
[](.github/workflows/ci.yml)
[](#packages)
[Getting Started](docs/GETTING-STARTED.md) · [Concepts](docs/CONCEPTS.md) · [Transports](docs/TRANSPORTS.md) · [Pretty](docs/PRETTY.md) · [Integrations](docs/INTEGRATIONS.md) · [Benchmarks](docs/BENCHMARKS.md) · [Comparison](docs/COMPARISON.md) · [AI Skill](docs/AI-SKILL.md) · [Architecture](docs/ARCHITECTURE.md)
**13 packages** · **35 integrations** (**19 browser / 16 Node.js**) · **25+ transports** (core / browser / Node.js / pretty / vendor) · **27 runtime-neutral processors** · **8 codecs** · **zero-dependency core**
---
LoggerJS is a monorepo of logging packages around a dependency-free, platform-neutral core. The same logger code runs in Node, browsers, workers, and edge runtimes. It is organized around three user-facing concepts plus one boundary rule:
- **Integrations** collect logs automatically from platform behavior — browser console calls, script errors, fetch/XHR failures, Web Vitals, route changes, Node process crashes, HTTP servers, serverless handlers, queue and database clients. All opt-in.
- **Middleware / processors** synchronously enrich, redact, sample, dedupe, rate-limit, fingerprint, buffer (fingers-crossed), route, and tag logs before delivery. Middleware run on raw records; processors run on projected events.
- **Transports** deliver logs anywhere — console, pretty DevTools/terminal output, stdout, files, HTTP, IndexedDB, WebSocket, service workers, worker threads, OTLP, Sentry, Datadog, Elasticsearch, Loki, CloudWatch, SQL databases — with reusable batching, retry, backoff, and circuit-breaker wrappers where the destination needs them.
- **Codecs belong to transports.** The pipeline keeps values raw; each destination owns its serialization. Built-in codecs are fast by default and never lose a log to an encoding error.
🌐 **Truly isomorphic**
Zero-dependency core, zero platform APIs, a type surface that compiles without DOM libs. One logger for Node, browsers, workers, and edge.
|
🎣 **Automatic collection, first-class**
35 opt-in integrations — 19 browser/frontend and 16 Node.js/server — turn platform behavior into structured logs.
|
⚡ **Performance with receipts**
Disabled levels cost ~3ns (pino parity). On the M1 Max reference machine, lean NDJSON runs at ~1.19× pino throughput and the prepared encoder at ~1.28× — faster than pino for equivalent output — [measured](docs/BENCHMARKS.md) with a drift-canceling A/B harness, checked into the [benchmark matrix](docs/BENCHMARK-MATRIX.md), and CI-gated. Ranking vs pino is CPU/V8-dependent.
|
🛟 **Logs survive bad days**
Crash-path `flushSync`, beacon on page close, offline replay, batch retry with circuit breakers, codecs that fall back instead of throwing.
|
🧩 **Composable pipeline**
27 runtime-neutral middleware and processors enrich, redact, sample, dedupe, rate-limit, fingerprint, route, and buffer — on raw records or projected events.
|
📚 **Library-author friendly**
`getLogger(["my-lib"])` is a silent no-op until the host app calls `configure()` — log from libraries without forcing a dependency on users.
|
## Table of Contents
- [Install](#install)
- [AI Skill](#ai-skill)
- [Quick Start](#quick-start)
- [Node](#node)
- [Browser](#browser)
- [Library authors](#library-authors)
- [How It Works](#how-it-works)
- [Typed Events](#typed-events)
- [Context Propagation](#context-propagation)
- [Performance](#performance)
- [Packages](#packages)
- [The Ecosystem](#the-ecosystem)
- [How It Compares](#how-it-compares)
- [Documentation](#documentation)
- [Development](#development)
- [License](#license)
## Install
Pick the package for your platform. Each platform package **re-exports all of `@loggerjs/core`**, so one install per app is enough to start.
```bash
# Node services
npm install @loggerjs/node @loggerjs/processors
# Browser apps
npm install @loggerjs/browser @loggerjs/processors
```