Repolode
dahlia

dahlia/logtape

A zero-dependency logging library for JavaScript and TypeScript that runs on Deno, Node.js, Bun, browsers, and edge functions.

Stars
2,016
Forks
55
Open issues
9
Last commit
4 days ago

What is it?

LogTape is a logging library for JavaScript and TypeScript built around a library-first design. Libraries can call it without any configuration, so their log calls stay silent by default, while applications decide where logs go and how verbose they are.

Logging is organized by hierarchical categories, so the log level can be set per module or per subtree of the category tree. It supports structured logging with attached data, template-literal messages, pluggable sinks, and built-in redaction of sensitive fields or patterns. The core package has no dependencies and runs on Deno, Node.js, Bun, browsers, and edge functions.

The monorepo also publishes optional packages: adapters for Pino, Winston, Bunyan, and log4js, sinks for AWS CloudWatch Logs, OpenTelemetry, Sentry, syslog, and Windows Event Log, file sinks, a pretty text formatter, and integrations for Express, Fastify, Hono, Koa, Elysia, GraphQL Yoga, and Drizzle ORM.

Key features

  • 01Zero dependencies in the core package
  • 02Hierarchical categories with per-level log level control
  • 03Structured logging and template-literal messages
  • 04Built-in redaction of sensitive data by pattern or field
  • 05Runs on Deno, Node.js, Bun, browsers, and edge functions
  • 06Adapters and sinks for Pino, Winston, OpenTelemetry, Sentry and more

Use cases

  • Adding logging to a library without forcing configuration on its users
  • Centralizing application logs across Deno, Node.js, and Bun projects
  • Sending structured logs to OpenTelemetry or Sentry
  • Logging HTTP requests and database queries in Express, Hono, or Drizzle apps

Quick start

  1. 1

    Install the core package with npm

    npm add @logtape/logtape
  2. 2

    Or install with Deno from JSR

    deno add jsr:@logtape/logtape
  3. 3

    Read the official manual for usage and configuration

In collections

Topics

FAQ

What is logtape?
A zero-dependency logging library for JavaScript and TypeScript that runs on Deno, Node.js, Bun, browsers, and edge functions. LogTape is a logging library for JavaScript and TypeScript built around a library-first design. Libraries can call it without any configuration, so their log calls stay silent by default, while applications decide where logs go and how verbose they are.
Is logtape free to use? What license does it have?
logtape is open source under the MIT license. Check the license terms before using it in commercial products.
Is logtape still maintained?
Actively maintained. The last commit to logtape was on Oct 19, 2026.
What can I use logtape for?
Adding logging to a library without forcing configuration on its users Centralizing application logs across Deno, Node.js, and Bun projects Sending structured logs to OpenTelemetry or Sentry Logging HTTP requests and database queries in Express, Hono, or Drizzle apps
How do I install logtape?
Install the core package with npm: npm add @logtape/logtape Or install with Deno from JSR: deno add jsr:@logtape/logtape Read the official manual for usage and configuration
Where can I get logtape?
The source code and installation instructions are on GitHub: https://github.com/dahlia/logtape

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects