LOG
v0.1.0 — Wide-event structured logger for Hyper — the reference plugin.
$ hyper add log
Copies 11 files into src/hyper/log/ and updates hyper.lock.json.
DEPS
- registry: core
FILES
- log/ai.ts
- log/builder.ts
- log/bun-sql.ts
- log/drains.ts
- log/drizzle.ts
- log/index.ts
- log/plugin.ts
- log/prisma.ts
- log/redact.ts
- log/types.ts
- log/wrap-queries.ts
README
@hyper/log
Wide-event structured logger for Hyper — the reference plugin.
One log event per request, attached to ctx.log. Pluggable drains (stdout, file, Axiom, memory, BYO). Secrets redacted by default.
Install
Components are installed as source into your repo, not pulled from npm:
bunx hyper add log
Wires the alias @hyper/log to src/hyper/log/ (configurable in hyper.config.json). See hyperjs.ai for the full registry.
Usage
import { Hyper } from "@hyper/core"
import { hyperLog } from "@hyper/log"
export default new Hyper()
.use(hyperLog({ service: "orders" }))
.get("/health", ({ ctx }) => {
ctx.log.event("health.check", { ok: true })
return { ok: true }
})
.listen(3000)
Docs
See the main README and docs/ for guides and integration recipes.
License
MIT
MANIFEST
- /r/log.json — latest
- /r/log@0.1.0.json — immutable