New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pipelogger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipelogger

Using named pipes for output debugging

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Pipelog

English | 中文

Overview

Pipelog is a small logging helper that writes formatted output into a named pipe (FIFO). It is designed for debugging workflows where you want to stream logs to another process without stdout/stderr interference. The project was originally built to debug the OpenCode plugin.

Features

  • Write logs to a FIFO file with timestamped lines
  • Serialize objects with util.inspect
  • Single-instance factory to avoid duplicate streams
  • Works with Node.js file system APIs and Bun runtime

Requirements

  • A POSIX environment that supports named pipes (e.g. macOS, Linux)
  • Node.js or Bun runtime

Installation

bun add pipelogger
npm install pipelogger
pnpm add pipelogger
yarn add pipelogger

Usage

Create and remove the FIFO file manually in your shell, then write log entries from TypeScript.

mkfifo /tmp/pipelog-example
import { Pipelog } from "pipelogger";

const pipepath = "/tmp/pipelog-example";
const logger = Pipelog.factory(pipepath);
logger.log("Hello, Pipelog!");
logger.log({ scope: "pipe", ok: true });

Read from another process:

cat /tmp/pipelog-example

When you are done, remove the FIFO:

rm /tmp/pipelog-example

API

Pipelog.factory(pipepath, options?)

Creates or returns a singleton instance.

  • pipepath: string, required
  • options.encoding: BufferEncoding, optional (default utf8)

Pipelog.getInstance()

Returns the existing instance if it was created.

log(...message)

Writes each payload as a new line with an ISO timestamp prefix.

destroy()

Closes the underlying write stream and resets the singleton.

Development

Install dependencies:

bun install

Run tests:

bun test ./src/test.ts

Build with Bun (minified):

bun build src/index.ts --target node --format esm --minify --outdir dist

License

MIT

Contributing

Issues and pull requests are welcome. Please include tests or reproduction steps where relevant.

Keywords

log

FAQs

Package last updated on 19 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts