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
JavaScript / TypeScript
logstack-js — Node, browsers, Next.js, Express, NestJS
Go
logstack-go-sdk — services, workers, stdlib log capture
Python
logstack-py — apps, Django, FastAPI, stdlib logging
Install
First log
Shared concepts
| Concept | Behavior |
|---|---|
| API key | Project key from the dashboard (ls_live_…) |
| Endpoint | Host only (e.g. https://api.logstack.tech); SDKs append /v1/logs |
| Levels | debug, info, warn, error, critical, fatal |
| Metadata | JSON object — searchable in the dashboard |
| Batching | Buffer + interval flush (defaults: 100 entries / ~5s) |
| Environment | production / staging / development / test label on each batch |
| Auto-capture | JS: 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
| Language | Package | Source |
|---|---|---|
| JavaScript / TypeScript | logstack-js | packages/logstack-js |
| Go | …/logstack-go-sdk | packages/logstack-go-sdk |
| Python | logstack-py (import logstack) | packages/logstack-python |
Guides
- JavaScript SDK (detailed) — config, levels, close/flush
- Go SDK — Config, context methods, stdlib capture
- Python SDK — client, Django, FastAPI
- Configuration (JS deep-dive)
- Logging best practices
- Framework integrations
- HTTP Logs API