Skip to main content
Home
This release is 2 versions behind 0.9.2 — the latest version of @logtape/logtape. Jump to latest

Built and signed on GitHub Actions

Simple logging library with zero dependencies for Deno/Node.js/Bun/browsers

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 months ago (0.9.0)
interface LoggerConfig

A logger configuration.

Type Parameters

TSinkId extends string
TFilterId extends string

Properties

The category of the logger. If a string, it is equivalent to an array with one element.

optional
sinks: TSinkId[]

The sink identifiers to use.

optional
parentSinks: "inherit" | "override"

Whether to inherit the parent's sinks. If inherit, the parent's sinks are used along with the specified sinks. If override, the parent's sinks are not used, and only the specified sinks are used.

The default is inherit.

optional
filters: TFilterId[]

The filter identifiers to use.

deprecated
optional
level: LogLevel | null

The log level to filter by. If null, the logger will reject all records.

optional
lowestLevel: LogLevel | null

The lowest log level to accept. If null, the logger will reject all records.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@logtape/logtape

Import symbol

import { type LoggerConfig } from "@logtape/logtape";
or

Import directly with a jsr specifier

import { type LoggerConfig } from "jsr:@logtape/logtape";

Add Package

pnpm i jsr:@logtape/logtape
or (using pnpm 10.8 or older)
pnpm dlx jsr add @logtape/logtape

Import symbol

import { type LoggerConfig } from "@logtape/logtape";

Add Package

yarn add jsr:@logtape/logtape
or (using Yarn 4.8 or older)
yarn dlx jsr add @logtape/logtape

Import symbol

import { type LoggerConfig } from "@logtape/logtape";

Add Package

npx jsr add @logtape/logtape

Import symbol

import { type LoggerConfig } from "@logtape/logtape";

Add Package

bunx jsr add @logtape/logtape

Import symbol

import { type LoggerConfig } from "@logtape/logtape";