Build on top

Custom framework integration

Build evlog support for an HTTP framework that doesn't ship a built-in integration — Medusa, AdonisJS, h3 directly, custom dispatchers, queue workers.

When the framework you use doesn't have an evlog/<framework> package yet, you build the integration yourself. evlog ships a small toolkit (createMiddlewareLogger, defineFrameworkIntegration) that handles the request-context plumbing — you only write the framework-specific glue.

Build an evlog integration for a custom framework

Canonical guide

The complete walkthrough lives in Custom integration:

  • The mental model (request lifecycle → logger creation → enrich → drain)
  • defineFrameworkIntegration() to declaratively wire request extraction and logger attachment
  • createMiddlewareLogger() for the imperative path
  • A worked example for a hypothetical framework

This page exists in the build-on-top section as a pointer — it's the same content, just classified by axis.

Non-HTTP runtimes

If you're integrating a non-HTTP runtime (queue worker, CLI driver, cron job, durable execution engine), use createRequestLogger from evlog/toolkit directly — see the same Custom integration page for the lower-level path.