@piggly/fastify-chassis
Version:
An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.
18 lines (17 loc) • 714 B
TypeScript
import type { FastifyInstance, RawServerBase } from 'fastify';
/**
* Log the response of the request.
*
* I will log only when debug mode is enabled.
* LoggerService will handle requests/responses if debug level is enabled as well.
*
* The best way for logging requests/response should be at nGINX or similar.
*
* @param {FastifyInstance<Server>} app The Fastify instance.
* @param {Environment} env The environment.
* @returns {void}
* @since 7.0.0
* @since 7.2.1 Added debug mode.
* @author Caique Araujo <caique@piggly.com.br>
*/
export declare const LogResponseHook: <Server extends RawServerBase, Environment extends Record<string, any>>(app: FastifyInstance<Server>, env: Environment) => void;