SDK documentation

Stream logs, crashes and user feedback to your LogWatcher server. Six SDKs, one API, one wire protocol — pick your platform:

Getting started

You need an application key. Create an account, add an app in the dashboard, and copy the key shown on its card. Every SDK call is tied to that key. Then follow your platform's guide above — the flow is always the same three steps: point the SDK at your server (before init), initialize with the app key, log.

How delivery works

Every SDK implements the same delivery model: log lines are written to a local, wire-ready queue first (SQLite, JSONL file, localStorage or memory depending on the platform), then uploaded in batches — every 5 minutes, or immediately when the queue reaches 200 rows / 64 KiB, in chunks of at most 1000 rows grouped by session. Entries are deleted only after the server acknowledges (at-least-once delivery), the queue is capped at 5 MiB with oldest-first eviction, and platforms with a persistent queue drain leftovers on the next launch — which is what delivers the breadcrumbs leading up to a crash. Android, Flutter and Go gzip large batches.

Remote device control

On every launch the SDK registers the device and receives its remote flags. From the dashboard you can enable log collection for a single device (a misbehaving terminal) while the rest of the fleet stays quiet — no release, no restart loop. To force collection locally regardless of the remote flag:

// same pair on every platform (Go: SetForceEnabled / ForceSendOnce)
LogWatcher.setForceEnabled(true)   // override the remote toggle
LogWatcher.forceSendOnce()          // flush the queue right now

Platform matrix

SDKPackageRuns onQueueCrash capture
Androidgr.fintechiq.logwatcher (AAR)Android 4.1+SQLite (persistent)uncaught-exception handler
iOSLogWatcher (SwiftPM)iOS 12+, macOS 10.15+JSONL file (persistent)NSUncaughtExceptionHandler
JavaScript@fintechiq/logwatcherBrowsers, Node ≥18localStorage / memoryonerror + unhandledrejection / process hooks
Svelte@fintechiq/logwatcher-svelteSvelte, SvelteKitas JavaScriptSvelteKit handleError + browser globals
Flutterlogwatcher_sdk (pub)Flutter mobile/desktop, Dart CLIJSONL file / memoryrecordError + FlutterError hooks
Gologwatcher-sdk-goGo 1.21+ services (GCP-aware)memory (bounded)RecoverPanic / ReportPanic

HTTP API reference

Everything every SDK does goes through five endpoints. Authentication is the X-App-Token header carrying your application key.

EndpointPurposeNotes
POST /app/device-statusRegister a device, fetch remote enable flagssent on every launch
POST /sessionStart a sessionreturns the numeric session id
POST /log/batchUpload a batch of log linesX-App-Session header; token must match the session's app; body may be gzip (Content-Encoding: gzip)
POST /issueIssues, crashes, user feedbackdiscriminated by type
POST /device/keyvalueSet one device key-valuetyped value

The full wire protocol is documented in the LogWatcher repository.

Ready to see your first remote log?
Create an app, copy its key, and init the SDK of your platform.
Get started