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

Built and signed on GitHub Actions

Works with
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 Score100%
Downloads2,985/wk
Publisheda year ago (0.8.0)

Unobtrusive logging library with zero dependencies—library-first design for Deno/Node.js/Bun/browsers/edge

function getFileSink
getFileSink(
path: string,
options?: FileSinkOptions,
): Sink & Disposable

Get a file sink.

Note that this function is unavailable in the browser.

Parameters

path: string

A path to the file to write to.

optional
options: FileSinkOptions

The options for the sink.

Return Type

Sink & Disposable

A sink that writes to the file. The sink is also a disposable object that closes the file when disposed.

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 { getFileSink } from "@logtape/logtape";
or

Import directly with a jsr specifier

import { getFileSink } 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 { getFileSink } 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 { getFileSink } from "@logtape/logtape";

Add Package

vlt install jsr:@logtape/logtape

Import symbol

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

Add Package

npx jsr add @logtape/logtape

Import symbol

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

Add Package

bunx jsr add @logtape/logtape

Import symbol

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