import { g as RequestLogger } from "../types-B82IuY7M.mjs"; import { t as BaseMxllogOptions } from "../middleware-Cbh6eBkJ.mjs"; import { FastifyPluginCallback } from "fastify"; //#region src/fastify/index.d.ts declare const useLogger: >() => RequestLogger; type MxllogFastifyOptions = BaseMxllogOptions; declare module 'fastify' { interface FastifyRequest { log: any; } } /** * Create an mxllog plugin for Fastify. * * @example * ```ts * import Fastify from 'fastify' * import { initLogger } from '@safaricom-mxl/log' * import { mxllog } from '@safaricom-mxl/log/fastify' * import { createAxiomDrain } from '@safaricom-mxl/log/axiom' * * initLogger({ env: { service: 'fastify-api' } }) * * const app = Fastify() * await app.register(mxllog, { * drain: createAxiomDrain(), * enrich: (ctx) => { * ctx.event.region = process.env.FLY_REGION * }, * }) * ``` */ declare const mxllog: FastifyPluginCallback; //#endregion export { MxllogFastifyOptions, mxllog, useLogger }; //# sourceMappingURL=index.d.mts.map