import { g as RequestLogger } from "../types-B82IuY7M.mjs"; import { t as BaseMxllogOptions } from "../middleware-Cbh6eBkJ.mjs"; import { MiddlewareHandler } from "hono"; //#region src/hono/index.d.ts type MxllogHonoOptions = BaseMxllogOptions; /** * Hono variables type for typed `c.get('log')` access. * * @example * ```ts * const app = new Hono() * app.use(mxllog()) * app.get('/api/users', (c) => { * const log = c.get('log') * log.set({ users: { count: 42 } }) * return c.json({ users: [] }) * }) * ``` */ type MxllogVariables = { Variables: { log: RequestLogger; }; }; /** * Create an mxllog middleware for Hono. * * @example * ```ts * import { Hono } from 'hono' * import { mxllog, type MxllogVariables } from '@safaricom-mxl/log/hono' * import { createAxiomDrain } from '@safaricom-mxl/log/axiom' * * const app = new Hono() * app.use(mxllog({ * drain: createAxiomDrain(), * enrich: (ctx) => { * ctx.event.region = process.env.FLY_REGION * }, * })) * ``` */ declare function mxllog(options?: MxllogHonoOptions): MiddlewareHandler; //#endregion export { MxllogHonoOptions, MxllogVariables, mxllog }; //# sourceMappingURL=index.d.mts.map