HYPERJS.AI

LOG

v0.1.0Wide-event structured logger for Hyper — the reference plugin.

$ hyper add log

Copies 11 files into src/hyper/log/ and updates hyper.lock.json.

DEPS

FILES

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