New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@cratestack/link-logger

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cratestack/link-logger

A small reference RpcLink for CrateStack's generated TypeScript RPC client that logs each call's op id, outcome, and duration.

latest
Source
npmnpm
Version
0.15.4
Version published
Maintainers
1
Created
Source

A small reference RpcLink (issue #182) for CrateStack's generated TypeScript RPC client (transport rpc schemas) that logs each call's kind, op id, outcome, and duration. Never touches response.body.

Usage

import { createLoggerLink } from "@cratestack/link-logger";
import { CratestackRpcRuntime } from "./generated/runtime"; // your project's generated client

const runtime = new CratestackRpcRuntime("https://api.example.com", {
  links: [createLoggerLink()],
});

Pass a custom logger (anything with info/error methods, e.g. pino or winston) instead of the default console:

createLoggerLink(myPinoLogger);

Order matters: put createLoggerLink() before @cratestack/link-batch in the links array if you want it to see the batched request, or after it if you want it to see each real per-call outcome — see that package's README for the composition details.

Keywords

cratestack

FAQs

Package last updated on 11 Oct 2026

Related posts