Fastify
Import from blyp-js/fastify.
import Fastify from "fastify";
import { createLogger } from "blyp-js/fastify";
const app = Fastify();
await app.register(createLogger({
level: "info",
}));
app.get("/hello", async (request) => {
request.blypLog.info("fastify-route");
return { ok: true };
});What Blyp decorates
request.blypLogrequest.blypStartTimerequest.blypError
The adapter logs in onResponse, records thrown failures from onError, and registers the client ingestion route when enabled.
Relevant types
import type {
FastifyLoggerConfig,
FastifyLoggerPlugin,
} from "blyp-js/fastify";