Skip to main content
This release is 1 version behind 0.6.3 — 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 weeks ago (0.6.2)
property TextFormatterOptions.level

The log level format. This can be one of the following:

  • "ABBR": The log level abbreviation in uppercase (e.g., "INF").
  • "FULL": The full log level name in uppercase (e.g., "INFO").
  • "L": The first letter of the log level in uppercase (e.g., "I").
  • "abbr": The log level abbreviation in lowercase (e.g., "inf").
  • "full": The full log level name in lowercase (e.g., "info").
  • "l": The first letter of the log level in lowercase (e.g., "i").

Alternatively, this can be a function that accepts a log level and returns a string.

The default is "ABBR".

Type

"ABBR"
| "FULL"
| "L"
| "abbr"
| "full"
| "l"
| ((level: LogLevel) => string)

Add Package

deno add jsr:@logtape/logtape

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @logtape/logtape

Import symbol

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

Add Package

yarn dlx jsr add @logtape/logtape

Import symbol

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

Add Package

pnpm dlx jsr add @logtape/logtape

Import symbol

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

Add Package

bunx jsr add @logtape/logtape

Import symbol

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