Skip to main content
Home

Built and signed on GitHub Actions

File sink and rotating file sink for LogTape

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
4 days ago (1.0.4)
interface StreamFileSinkOptions

Options for the getStreamFileSink function.

This interface configures the high-performance stream-based file sink that uses Node.js PassThrough streams for optimal I/O performance with automatic backpressure management.

Properties

readonly
optional
highWaterMark: number

High water mark for the PassThrough stream buffer in bytes.

This controls the internal buffer size of the PassThrough stream. Higher values can improve performance for high-volume logging but use more memory. Lower values reduce memory usage but may impact performance.

readonly
optional
formatter: TextFormatter

A custom formatter for log records.

If not specified, the default text formatter will be used, which formats records in the standard LogTape format with timestamp, level, category, and message.

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/file

Import symbol

import { type StreamFileSinkOptions } from "@logtape/file";
or

Import directly with a jsr specifier

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

Add Package

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

Import symbol

import { type StreamFileSinkOptions } from "@logtape/file";

Add Package

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

Import symbol

import { type StreamFileSinkOptions } from "@logtape/file";

Add Package

vlt install jsr:@logtape/file

Import symbol

import { type StreamFileSinkOptions } from "@logtape/file";

Add Package

npx jsr add @logtape/file

Import symbol

import { type StreamFileSinkOptions } from "@logtape/file";

Add Package

bunx jsr add @logtape/file

Import symbol

import { type StreamFileSinkOptions } from "@logtape/file";