Node
Lyrelog for Node
The same package as the browser, on your server: uncaught exceptions are kept on disk and sent when the process starts again, and a server key marks your events as verified.
import { Lyrelog } from "@lyrelog/js"; export const log = Lyrelog.init({ // a server key, lyr_srv_..., kept on the server apiKey: process.env.LYRELOG_KEY!, platform: "api", // "node" unless you say });
Version 1.0.0. Node 22.12 or later.
What it does on Node
Start it and these come with it. Where the platform can't tell by itself, it's a call or a few lines, all in the guide.
- On its ownCrashes and uncaught errorsUncaught exceptions and rejections, sent on the next start
- On its ownSessionsOne per process
- On its ownEnvironment, told apartProduction when NODE_ENV=production, else development
- A call or a few linesEvents wait when offlineIn memory, up to 10,000 events: flush before exiting
- On its ownVerified eventsWith a server key
- Not thereYour existing loggingNo pino or winston adapter: call the SDK
Node, in practice
What the guide says to keep in mind on this platform.
- Serverless functions await log.flush() before returning.
- Close the client on SIGTERM: process.exit() loses what's queued.
- An Express error handler is a few lines: captureError with the route.
- The Node guide
Same project, every platform
Your app, your website and your servers send to one project, and a person's events line up across all of them.
- SwiftiOS, iPadOS, macOS, tvOS, watchOS, visionOS
- AndroidKotlin and Java apps
- React NativeiOS and Android, New Architecture
- FlutteriOS and Android
- BrowsersJavaScript and TypeScript websites
- PythonDjango, FastAPI, workers and scripts
- GoServices and command-line tools
- JVMJava and Kotlin servers, Spring and Ktor
- All platforms
See it with your own app's events
Sign up with GitHub, Google or Apple. Your organization starts on Free; move it to Pro whenever you want.