mcpField
E
evlog

evlog

github.com/dobroslavradosavljevicDevelopment344 installsUpdated 3d ago
Repository

About evlog

The evlog skill guides developers working with evlog through logging design, implementation, and verification. It organizes references around wide events, structured errors, pipelines, framework adapters, and telemetry, with attention to version checks and operational details.

Key features

  1. 01Inspect versions and logging integrations
  2. 02Design wide events and structured errors
  3. 03Configure sampling, audits, and pipelines
  4. 04Guide framework adapters and plugins
  5. 05Run coverage checks and verification

Use cases

  1. 01Refactor scattered logs into wide events
  2. 02Configure production sampling and retries
  3. 03Integrate evlog with a framework and check coverage
  4. 04Investigate telemetry, plugins, or client logs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dobroslavradosavljevic/skills --skill evlog

After installing, type/evlogin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
cli-advanced.md
extend.md
frameworks-adapters.md
setup-core.md
source-map.md
wide-events-errors.md

Details

From the project README

evlog

Use this skill when work touches evlog — wide events, structured errors, drains, sampling, audit trails, AI SDK / eve telemetry, CLI product telemetry, client logging, plugins, or @evlog/cli map coverage scoring.

Snapshot: [email protected], @evlog/[email protected], @evlog/[email protected] (verified 2026-10-01; no newer releases). Refresh from source-map.md if versions differ.

Workflow

  1. Inspect the local logging surface before changing code:
    • Package versions for evlog, optional @evlog/cli / @evlog/telemetry / @evlog/nuxthub, framework peers, and drain destinations in use.
    • Integration path: Nuxt/Nitro module, Next createEvlog/withEvlog, TanStack Start evlog/nitro/v3, Hono/Express/Fastify/Elysia middleware, Workers, Astro/Lambda guides, standalone initLogger.
    • Patterns: scattered console/pino lines vs log.set wide events, createError({ why, fix }), audits, AI wraps, eve hooks, client ingest, plugins.
  2. Refresh docs when versions or APIs are unclear. Start from source-map.md.
  3. For install, three logging modes, initLogger, and core APIs, use setup-core.md.
  4. For wide-event design, sealing/fork, structured errors, catalogs, and redaction, use wide-events-errors.md.
  5. For framework wiring and adapter choice, use frameworks-adapters.md.
  6. For pipelines, sampling, audit, AI, client logs, and evlog map/CI, use cli-advanced.md.
  7. For plugins, stream, diagnostics, toolkit, @evlog/telemetry, and evlog/eve, use extend.md.

Implementation Judgment

  • Prefer one wide event per unit of work (log.set then auto-emit or manual emit) over many info lines in the same request/job/turn.
  • Group context into nested objects (user, cart, payment) with meaningful keys—not flat userId/cartId soup or a generic data bag.
  • Use the right mode: log.* for one-shots; createLogger / createRequestLogger when you own the lifecycle; framework useLogger / req.log / c.get('log') when middleware owns create+emit.
  • Tagged log.info('tag', 'message') is console-only in pretty mode. Object form always hits drains.
  • Throw createError({ message, status, why, fix, link?, code?, internal? }) instead of bare Error. Parse on clients with parseError.
  • After emit (or sampled drop), the logger is sealed—post-response set is ignored. Use log.fork (where available) for intentional background child events.
  • Libraries and shared packages: use createLogger / accept a logger; do not call initLogger and force a drain on the host.
  • Production: wrap adapters in createDrainPipeline (batch + retry); enable head+tail sampling; keep errors and money/auth paths.
  • On Nuxt/Nitro/Next/TanStack Start/Hono, run bunx @evlog/cli map before large logging refactors—fix FIX FIRST first. Pin CLI version in CI.

Verification

Prefer the repo's existing checks. For meaningful evlog changes, include the relevant subset:

  • Hit a route/job locally and confirm one wide event with expected nested fields (pretty in dev).
  • Force a createError path and confirm why/fix in logs and client parseError.
  • bunx @evlog/cli map / doctor when changing entry-point coverage or setup.
  • Drain smoke (Axiom/Sentry/Loki/fs NDJSON) when changing pipelines; flush on shutdown.
  • Sampling config check: errors and keep rules still retained in production-shaped config.
  • Typecheck for RequestLogger, typed fields, and catalog imports.

Comments

Markdown supported