SDK Reference
Lognitor provides official SDKs for the most popular platforms. Each SDK handles batching, retries, error deduplication, PII redaction, and graceful shutdown out of the box.
Available SDKs
Node.js
@lognitor/nodeFor server-side JavaScript and TypeScript. Includes integrations for Express, Fastify, Hono, Next.js, and NestJS.
Browser
@lognitor/browserFor client-side JavaScript. Auto-captures errors, console output, fetch requests, and session data.
React
@lognitor/reactWraps the Browser SDK with React-specific components: provider, error boundary, and hooks.
Python
lognitorFor Python applications. Includes integrations for Django, Flask, and FastAPI. Thread-safe.
PHP
lognitor/lognitorFor PHP applications. Includes integrations for Laravel, Symfony, and WordPress. PSR-3 compatible.
Shared Features Across All SDKs
All Lognitor SDKs share the same core feature set:
- Five log levels —
debug,info,warn,error,fatal - Automatic batching — logs are buffered and sent in configurable batches
- Retry with backoff — failed requests are retried automatically
- Error deduplication — identical errors are counted, not sent individually
- User context — attach user identity to all logs
- Global context and tags — add metadata that applies to every log
- Breadcrumbs — record event trails that are attached to error logs
- Timers — measure durations with automatic
perf.duration_ms - Heartbeat monitoring — ping monitors for cron jobs and background tasks
- Release tracking — register deployments and correlate errors with releases
- User feedback — collect user comments linked to error events
- Child loggers — create scoped loggers for specific modules
- PII redaction — built-in patterns for email, credit card, SSN, bearer tokens
beforeSendhook — inspect, modify, or drop any log before sending- Flush and shutdown — graceful cleanup with automatic signal handling
- Pause and resume — control log sending without losing buffered data
- Runtime reconfiguration — change log level, batch size, and other settings on the fly
REST API
If an SDK is not available for your language, you can use the REST API directly. This is also useful for scripting, CI/CD pipelines, and testing.