✦ For Hono · Cloudflare Workers · Bun · Deno · Node · Vercel ✦
Hono's built-in logger() middleware is great for dev. It prints to console and disappears. FlareLog is the production layer — structured logs, error capture, and AI debugging that work identically across Cloudflare Workers, Bun, Deno, Node, and Vercel.
POST /api/orders -- 200
GET /api/users -- 200
Error: [object Object]
↑ no trace, no body, no retention
Dev Only
Not a production story
5
Runtimes supported
1
Line to install
90d
Pro retention
$19
flat Pro bucket
Hono is multi-runtime. Your observability stack isn't. That breaks production.
You deployed the same Hono app to Cloudflare Workers, then to Bun, then to a Vercel preview. Three runtimes, three different log formats, three retention limits. Errors fall through the cracks between environments. FlareLog gives you one structured view across every Hono target.
The @flarelog/sdk/hono package is runtime-agnostic. It uses Web standard fetch() to ship logs — no Node-only APIs, no runtime adapters, no polyfills.
Install the SDK
Run npm install @flarelog/sdk. One package covers Hono middleware plus any other FlareLog framework wrappers you need (Next.js, TanStack Start, React, Express).
Add the middleware
Import honoMiddleware from @flarelog/sdk/hono and register it with app.use("*", honoMiddleware(logger)).
Use c.get('logger') anywhere
Every request automatically gets a child logger with traceId, method, and path. Add breadcrumbs, structured metadata, or log errors with full context.
Deploy to your runtime of choice
Same code works on Cloudflare Workers, Bun, Deno Deploy, Node, or Vercel. Set FLARELOG_API_KEY as an env var and deploy.
import { Hono } from "hono";
import { flarelog } from "@flarelog/sdk";
import { honoMiddleware } from "@flarelog/sdk/hono";
const app = new Hono();
const logger = flarelog({ apiKey: env.FLARELOG_API_KEY });
// One line. Every request gets structured logs.
app.use("*", honoMiddleware(logger));
app.get("/api/orders/:id", async (c) => {
const logger = c.get("logger");
const id = c.req.param("id");
try {
const order = await fetchOrder(id);
logger.info("Order fetched", { orderId: id });
return c.json(order);
} catch (err) {
// Auto-captured by middleware, but you can add context:
logger.logError(err, { message: "Order lookup failed" });
return c.json({ error: "Order not found" }, 404);
}
});
export default app;// Hono runs anywhere. FlareLog follows.
// ── Cloudflare Workers (wrangler.jsonc) ──────────────────────
// { "vars": { "FLARELOG_API_KEY": "fl_..." } }
// ── Bun (bun run dev) ────────────────────────────────────────
// export const logger = flarelog({ apiKey: Bun.env.FLARELOG_API_KEY });
// ── Node / Vercel / Deno ─────────────────────────────────────
// export const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
// Same `honoMiddleware(logger)` works in every runtime.
// No runtime-specific adapter, no node_modules bloat.# Cloudflare Workers (wrangler.jsonc vars)
# Vercel: vercel env add FLARELOG_API_KEY
# Bun: export FLARELOG_API_KEY=fl_...
# Deno: --env flag or .env file
FLARELOG_API_KEY=fl_your_api_keyCloudflare Workers, Bun, Deno Deploy, Node, Vercel Edge. The SDK uses Web standard fetch() — no Node-only APIs, no runtime adapters. Your logs look identical across environments.
Query by c.req.path, status code, traceId, or any custom metadata. Filter errors across all your Hono services in one dashboard.
Logs inside c.executionCtx.waitUntil on Workers or async Hono handlers are batched and flushed before the invocation ends. Nothing is lost when the isolate freezes.
Stop losing every log on the next deploy or isolate restart. 7 days on the free tier, 90 days on Pro. That bug from last Tuesday's release? Still searchable.
Any uncaught exception in a route handler is captured with stack trace, request context, and breadcrumbs — even if your try/catch missed it.
Connect FlareLog's MCP server to Cursor, Claude Desktop, or Lovable Agent. Ask "why did /api/orders 500 in the last hour?" and get structured answers.
Hono ships a Logger Middleware in the core package. It's perfect for seeing requests scroll by in your terminal. But the moment you deploy, you need search, retention, and error capture — and that's where FlareLog picks up.
Use case
Same Hono codebase shipped to Workers + Bun + Vercel. FlareLog unifies logs across every runtime into one queryable dashboard.
Use case
A Hono API gateway proxying dozens of upstreams. FlareLog captures every upstream latency, status, and error with trace correlation.
Use case
Hono powering an LLM agent or MCP server. FlareLog's MCP server lets Cursor/Claude read your prod logs and propose fixes.
FlareLog's MCP server connects Cursor, Claude Desktop, or Lovable Agent to your real Hono production logs. Skip the dashboard and let your AI read structured errors with full request context.
{
"mcpServers": {
"flarelog": {
"url": "https://mcp.flarelog.dev",
"headers": {
"Authorization": "Bearer fl_your_api_key"
}
}
}
}↑ Paste into Cursor, Claude Desktop, or Lovable Connectors.
Yes. The SDK uses Web standard APIs (fetch, crypto.randomUUID) and works out of the box on the Workers runtime. Logs are flushed via ctx.waitUntil so nothing is dropped when the isolate freezes.
Yes. The same honoMiddleware(logger) works on every runtime Hono supports. The SDK reads the API key from process.env (Node, Bun, Deno with --env), Bun.env, or env binding on Workers. No adapters.
Hono's logger() middleware prints to console — perfect for local dev. But in production you need: structured fields (not text), multi-day retention, search, error capture, and alerting. FlareLog is the production layer on top of Hono's dev story. You can run both — many teams do.
No. Logs are batched and sent asynchronously via waitUntil or setTimeout depending on runtime. Per-request overhead is sub-millisecond and never blocks the response. Hono's reputation for speed stays intact.
Same concern, which is why the SDK is fully tree-shakable. The 11KB ceiling is what you'd ship if you imported every framework wrapper (Hono + Express + TanStack Start + React + Next.js + Cloudflare Workers). If you only import @flarelog/sdk/hono, everything else gets stripped at build time. Import just flarelog + honoMiddleware and your actual addition is far under the ceiling.
Yes. The middleware wraps next() in a try/catch. Any uncaught exception in a route handler is logged with stack trace, request method, path, traceId, and any breadcrumbs you added via c.get("logger").addBreadcrumb() before the error.
Free tier: 10,000 logs/month, 7-day retention. Pro: $19/month for 1M logs/month and 90-day retention. No surprises during traffic spikes — flat bucket pricing, not per-event metering.
Free tier includes 10,000 logs/month, structured search, automatic error capture, and MCP debugging. Works across every Hono runtime. No credit card.