# fullstack-build/tslog

📝 tslog - Universal Logger for TypeScript and JavaScript

Repository: https://github.com/fullstack-build/tslog
Canonical: https://ross.abutalabs.com/products/tslog
Homepage: https://tslog.js.org
Language: TypeScript
License: MIT
License Family: permissive
Topics: logger, logging, logging-library, typescript-library, stacktrace, stack, error-handling, exceptions, pretty-print, json, json-api
Last push: 2026-08-10T23:32:19+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 93, longevity 100
- inputs: {"age_days": 2323, "days_push": 23, "days_rel": 48, "gap_med": 1.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1737, forks 73 (observed 2026-08-28T04:05:29.823941+00:00)

## What it is
tslog is a universal, fully typed logging library for TypeScript and JavaScript that runs in Node.js, browsers, Deno, Bun, workers, and React Native. It provides pretty colored console output by default, structured fields-first JSON for observability pipelines, secret masking, sub-loggers, and pluggable transports and middleware.

## Use cases
- add structured JSON logging to a Node.js API for log pipelines
- pretty-print logs with source-mapped line numbers and stack traces in TypeScript
- log consistently across Node.js, browser, Deno, and Bun with one library
- mask secrets and sensitive keys in log output
- create child loggers with inherited settings for modules or agents
- add logging to LLM agent workflows with session correlation

## When to choose
- you want a zero-dependency, tree-shakeable logger for TypeScript/JavaScript across runtimes
- you need both human-friendly pretty output and machine-readable JSON from the same logger
- you want built-in secret masking, sub-loggers, and typed middleware/transports

## When to avoid
- you need a battle-tested log aggregator or distributed tracing backend rather than a logging library
- you are locked to CommonJS, since v5 is ESM-only
- you need file-based or rotating log sinks out of the box

## Facets
- artifact type: library
- maturity: active
- function: logging, error-handling, serialization
- domain: developer-tools, backend, frontend, monitoring
- platform: bun, browser, cross-platform
- tags: typescript, structured-logging, pretty-print, stacktrace, secret-masking, llm-agents, zero-dependencies, esm, nodejs, deno

## Member repositories
- fullstack-build/tslog (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:29.823941+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:30:38.040791+00:00, confidence not recorded.
  - readme: https://github.com/fullstack-build/tslog (fetched 2026-08-28T04:05:29.823941+00:00, sha e1256112a53d)
  - homepage: https://tslog.js.org (fetched 2026-08-29T11:08:02.792849+00:00, sha 2ec6af964fd9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
