Skip to main content

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
a week ago (0.7.1)
function getLogger
getLogger(category?: string | readonly string[]): Logger

Get a logger with the given category.

const logger = getLogger(["my-app"]);

Parameters

optional
category: string | readonly string[]

The category of the logger. It can be a string or an array of strings. If it is a string, it is equivalent to an array with a single element.

Return Type

The logger.

Add Package

deno add jsr:@logtape/logtape

Import symbol

import { getLogger } from "@logtape/logtape";

---- OR ----

Import directly with a jsr specifier

import { getLogger } from "jsr:@logtape/logtape";

Add Package

npx jsr add @logtape/logtape

Import symbol

import { getLogger } from "@logtape/logtape";

Add Package

yarn dlx jsr add @logtape/logtape

Import symbol

import { getLogger } from "@logtape/logtape";

Add Package

pnpm dlx jsr add @logtape/logtape

Import symbol

import { getLogger } from "@logtape/logtape";

Add Package

bunx jsr add @logtape/logtape

Import symbol

import { getLogger } from "@logtape/logtape";