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
3 weeks ago (0.8.0)
property AnsiColorFormatterOptions.timestamp

The timestamp format. This can be one of the following:

  • "date-time-timezone": The date and time with the full timezone offset (e.g., "2023-11-14 22:13:20.000 +00:00").
  • "date-time-tz": The date and time with the short timezone offset (e.g., "2023-11-14 22:13:20.000 +00").
  • "date-time": The date and time without the timezone offset (e.g., "2023-11-14 22:13:20.000").
  • "time-timezone": The time with the full timezone offset but without the date (e.g., "22:13:20.000 +00:00").
  • "time-tz": The time with the short timezone offset but without the date (e.g., "22:13:20.000 +00").
  • "time": The time without the date or timezone offset (e.g., "22:13:20.000").
  • "date": The date without the time or timezone offset (e.g., "2023-11-14").
  • "rfc3339": The date and time in RFC 3339 format (e.g., "2023-11-14T22:13:20.000Z").

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

The default is "date-time-tz".

Type

"date-time-timezone"
| "date-time-tz"
| "date-time"
| "time-timezone"
| "time-tz"
| "time"
| "date"
| "rfc3339"
| ((ts: number) => string)

Add Package

deno add jsr:@logtape/logtape

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @logtape/logtape

Import symbol

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

Add Package

yarn dlx jsr add @logtape/logtape

Import symbol

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

Add Package

pnpm dlx jsr add @logtape/logtape

Import symbol

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

Add Package

bunx jsr add @logtape/logtape

Import symbol

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