FlareLog captures uncaught exceptions, unhandled rejections and failed requests in your Node.js app, with the stack trace and request context. Then it lets Claude or Cursor read them so your AI can fix the bug.
Free up to 25,000 logs/mo · no card needed
The process restarted. The logs went with it. The user just saw a 500.
Whether you run on Render, Railway, Fly.io, a VPS or Docker, stdout scrolls away and restarts wipe the context. FlareLog keeps every error searchable, grouped into issues, and alerts you when a new one appears.
Create the logger once. Uncaught errors are captured from then on. Add the middleware for request context.
Install the SDK
Run npm install @flarelog/sdk. The same package works in Node.js, Next.js, Cloudflare Workers and the browser.
Set your API key
Add FLARELOG_API_KEY to your environment. Environment, release and server name are detected automatically.
Add the middleware
For Express, add expressMiddleware and expressErrorHandler. Each request gets req.logger with its trace ID. The SDK docs cover Fastify, NestJS and Koa too.
Log your background work
Use logger.child() in queue workers and cron jobs, and call logger.flush() on shutdown so nothing is lost.
import express from "express";
import { flarelog } from "@flarelog/sdk";
import { expressMiddleware, expressErrorHandler } from "@flarelog/sdk/express";
// Uncaught exceptions and unhandled rejections are captured automatically
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
const app = express();
app.use(expressMiddleware(logger));
app.get("/api/users/:id", async (req, res) => {
req.logger.info("Fetching user", { userId: req.params.id });
res.json(await db.users.findById(req.params.id));
});
app.use(expressErrorHandler(logger));
app.listen(3000);import { Worker } from "bullmq";
const worker = new Worker("email-queue", async (job) => {
const jobLogger = logger.child({ source: "worker", jobId: job.id });
try {
await sendEmail(job.data);
jobLogger.info("Job completed");
} catch (err) {
jobLogger.logError(err, { message: "Job failed" });
throw err; // let BullMQ retry
}
});
// Send anything still buffered before the process exits
process.on("SIGTERM", async () => {
await logger.flush();
process.exit(0);
});Uncaught exceptions, unhandled promise rejections and console.error calls are sent with their stack trace, without wrapping your code in try/catch.
Repeated errors are grouped into one issue with counts and first and last seen times. Get an email, Slack, Discord or webhook alert when a new one appears.
Search by message, status:500, user_id:42 or any metadata you log. Keep 7 days free, 30 on Indie and 90 on Pro.
FlareLog's MCP server gives Claude, Cursor and other AI coding tools read access to your production logs. Your AI sees the real error, the stack trace and the request that caused it, then suggests the fix in your editor.
{
"mcpServers": {
"flarelog": {
"url": "https://mcp.flarelog.dev",
"headers": {
"Authorization": "Bearer fl_your_api_key"
}
}
}
}Cursor format. Other MCP clients use the same URL and bearer token.
Yes. Express has ready-made middleware, and the SDK docs show the setup for Fastify, NestJS and Koa. Plain scripts, CLIs and queue workers work with the logger on its own.
Anywhere Node.js runs and can make HTTPS requests: Render, Railway, Fly.io, a VPS, Docker or Kubernetes. FlareLog doesn't need access to your host.
Yes. FlareLog accepts OTLP over HTTP (JSON), so you can point an existing OpenTelemetry exporter at it without the SDK.
No. Logs are batched and sent in the background. Call logger.flush() on shutdown so the last batch isn't lost.
Yes. Use the SDK's beforeSend hook to remove or mask fields before anything leaves your server.
The free plan includes 25,000 logs a month with 7-day retention. Pro is $19 a month for 1M logs and 90-day retention.
The free plan includes 25,000 logs a month, issue grouping and alerts. No credit card needed.