LogstackLogstack

SDK Overview

Official Logstack SDKs for JavaScript/TypeScript, Go, and Python.

SDK Overview

Logstack ships three official SDKs. All talk to the same ingest API (POST /v1/logs), support structured metadata, batching, and optional automatic capture of existing logger / console output.

Choose your language

Install

npm install logstack-js
# or: pnpm add logstack-js / yarn add logstack-js

First log

import { createLogStack } from "logstack-js";
 
const logstack = createLogStack({
  apiKey: process.env.LOGSTACK_API_KEY!,
});
 
logstack.info("User signed up", { userId: "user_123" });
await logstack.close();

Shared concepts

ConceptBehavior
API keyProject key from the dashboard (ls_live_…)
EndpointHost only (e.g. https://api.logstack.tech); SDKs append /v1/logs
Levelsdebug, info, warn, error, critical, fatal
MetadataJSON object — searchable in the dashboard
BatchingBuffer + interval flush (defaults: 100 entries / ~5s)
Environmentproduction / staging / development / test label on each batch
Auto-captureJS: console.* · Go: stdlib log · Python: stdlib logging

Logs are shipped in every environment when an API key is set. Console / local logger output is separate from network shipping.

Package map

LanguagePackageSource
JavaScript / TypeScriptlogstack-jspackages/logstack-js
Go…/logstack-go-sdkpackages/logstack-go-sdk
Pythonlogstack-py (import logstack)packages/logstack-python

Guides

On this page