LogstackLogstack

Quick Start

Get Logstack running in your application in under 5 minutes.

Quick Start

Get Logstack integrated into your application in 5 minutes.

Create an Account

Sign up for Logstack at logstack.tech/signup or deploy your own instance.

Create a Project

After signing in, create a new project from the dashboard. You'll receive an API key starting with ls_live_.

Keep your API key secure. Never commit it to version control or expose it in client-side code.

Install the SDK

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

Initialize and log

src/lib/logger.ts
import { createLogStack } from "logstack-js";
 
export const logger = createLogStack({
  apiKey: process.env.LOGSTACK_API_KEY!,
  // captureConsole defaults to true — existing console.* calls are shipped
});
src/index.ts
import { logger } from "./lib/logger";
 
logger.info("Application started", { version: "1.0.0" });
logger.info("User action", {
  userId: "user_123",
  action: "login",
});
 
try {
  throw new Error("Something went wrong");
} catch (error) {
  logger.error("Operation failed", {
    error: (error as Error).message,
    stack: (error as Error).stack,
  });
}

View Your Logs

Open the Logstack dashboard to see your logs streaming in real-time. Use filters to search by level, time range, or metadata.

What's next?

Environment variables

.env
# Required: project ingest key from the dashboard
LOGSTACK_API_KEY=ls_live_your_api_key_here
 
# Optional: self-hosted API host (no /v1 suffix)
LOGSTACK_ENDPOINT=https://api.logstack.tech
# Go SDK reads the same idea as APIURL; Python as api_url

Add .env to .gitignore so secrets never land in git.

On this page