Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/docs/content/4.integrate/frameworks/00.overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ No HTTP framework? Use [Standalone TypeScript](/integrate/frameworks/standalone)
| [React Router](/integrate/frameworks/react-router) | `evlog/react-router` | Middleware | `context.get(loggerContext)` / `useLogger()` | Stable |
| [NestJS](/integrate/frameworks/nestjs) | `evlog/nestjs` | Module | `useLogger()` | Stable |
| [Express](/integrate/frameworks/express) | `evlog/express` | Middleware | `req.log` / `useLogger()` | Stable |
| [Hono](/integrate/frameworks/hono) | `evlog/hono` | Middleware | `c.get('log')` | Stable |
| [Hono](/integrate/frameworks/hono) | `evlog/hono` | Middleware | `c.get('log')` / `useLogger()` | Stable |
| [Fastify](/integrate/frameworks/fastify) | `evlog/fastify` | Plugin | `request.log` / `useLogger()` | Stable |
| [Elysia](/integrate/frameworks/elysia) | `evlog/elysia` | Plugin | `log` (context) / `useLogger()` | Stable |
| [oRPC](/integrate/frameworks/orpc) | `evlog/orpc` | Handler wrapper + middleware | `context.log` / `useLogger()` | Stable |
Expand Down Expand Up @@ -54,16 +54,16 @@ Two things differ per framework: how you **bootstrap** evlog, and how you **acce
| Pattern | Frameworks |
|---------|------------|
| `useLogger(event)` | Nuxt, Nitro |
| `useLogger()` | Next.js, NestJS, Express, Fastify, Elysia, SvelteKit, React Router |
| `c.get('log')` | Hono — no `useLogger()` export |
| `useLogger()` | Next.js, NestJS, Express, Fastify, Elysia, SvelteKit, React Router, Hono |
| `c.get('log')` | Hono |
| `req.log` | Express |
| `request.log` | Fastify |
| `event.locals.log` | SvelteKit |
| `context.get(loggerContext)` | React Router |
| `createRequestLogger()` / `createLogger()` | Standalone, Workers, manual setups |

::callout{icon="i-lucide-info" color="info"}
Hono intentionally has no `useLogger()` — use `c.get('log')` inside handlers. See [Hono integration](/integrate/frameworks/hono).
On Hono, use `c.get('log')` inside handlers and `useLogger()` from `evlog/hono` in the layers underneath. See [Hono integration](/integrate/frameworks/hono).
::

## Full-Stack Frameworks
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/content/7.reference/1.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ See [Structured Errors — Development terminal output](/learn/structured-errors

### Environment Context

The `env` option controls the fields included in every log event. Most values are auto-detected from environment variables and `package.json`.
The `env` option controls the fields included in every log event. Most values are auto-detected from environment variables.

| Field | Type | Default | Auto-detected from |
|-------|------|---------|-------------------|
| `service` | `string` | `'app'` | `SERVICE_NAME`, `package.json` name |
| `service` | `string` | `'app'` | `SERVICE_NAME` |
| `environment` | `string` | `'development'` | `NODE_ENV` |
| `version` | `string` | `undefined` | `APP_VERSION`, `package.json` version |
| `commitHash` | `string` | `undefined` | `COMMIT_SHA`, `GIT_COMMIT`, `VERCEL_GIT_COMMIT_SHA` |
| `region` | `string` | `undefined` | `FLY_REGION`, `AWS_REGION`, `VERCEL_REGION` |
| `version` | `string` | `undefined` | `APP_VERSION` |
| `commitHash` | `string` | `undefined` | `COMMIT_SHA`, `GITHUB_SHA`, `VERCEL_GIT_COMMIT_SHA`, `CF_PAGES_COMMIT_SHA` |
| `region` | `string` | `undefined` | `VERCEL_REGION`, `AWS_REGION`, `FLY_REGION`, `CF_REGION` |

### Silent Mode

Expand Down
17 changes: 10 additions & 7 deletions apps/docs/skills/build-audit-logs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,16 @@ Three patterns, in order of preference:
```ts
import { withAudit, AuditDeniedError } from 'evlog'

export const refundInvoice = withAudit({
action: 'invoice.refund',
target: ({ id }: { id: string }) => ({ type: 'invoice', id }),
})(async ({ id }, ctx) => {
if (!ctx.actor) throw new AuditDeniedError('Anonymous refund denied')
return db.invoices.refund(id)
})
export const refundInvoice = withAudit(
{
action: 'invoice.refund',
target: ({ id }: { id: string }) => ({ type: 'invoice', id }),
},
async ({ id }, ctx) => {
if (!ctx.actor) throw new AuditDeniedError('Anonymous refund denied')
return db.invoices.refund(id)
},
)
```

Outcome resolution:
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/skills/review-logging-patterns/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ All options work in Nuxt (`evlog` key), Nitro (passed to `evlog()`), Next.js (`c
| ClickHouse | `evlog/clickhouse` | `CLICKHOUSE_ENDPOINT`, optional `CLICKHOUSE_USER` / `CLICKHOUSE_PASSWORD` / `CLICKHOUSE_DATABASE` / `CLICKHOUSE_TABLE` |
| File System | `evlog/fs` | None (local file system) |
| Memory | `evlog/memory` | None (in-process ring buffer; optional `EVLOG_MEMORY_STORE`, `EVLOG_MEMORY_MAX_EVENTS`). Read back with `readMemoryLogs()` — ideal for dev-only log endpoints agents can query |
| NuxtHub | `@evlog/nuxthub` (separate package, Nuxt module) | None — stores wide events in the NuxtHub database with retention-based cleanup (`evlog.nuxthub: { retentionDays, batchSize }`) |
| NuxtHub | `@evlog/nuxthub` (separate package, Nuxt module) | None — stores wide events in the NuxtHub database with retention-based cleanup (set `evlog.retention: '7d'` in the module options; accepts `d`/`h`/`m`) |
| HTTP (browser ingest) | `evlog/http` | None (configure `endpoint` in code). `evlog/browser` is deprecated; same API, removed next major |

Use canonical env var names (e.g. `AXIOM_API_KEY`, `BETTER_STACK_API_KEY`) — the same names work in every framework.
Expand Down
Loading