Fastify preHandler hook that logs incoming request details:
preHandler
Incoming request [{id}]: {method} {url} HTTP/{httpVersion} from {ip} Copy
Incoming request [{id}]: {method} {url} HTTP/{httpVersion} from {ip}
Intended to be registered via:
fastify.addHook("preHandler", preHandler) Copy
fastify.addHook("preHandler", preHandler)
Uses request.log.debug so each log record is automatically correlated with the request ID assigned by Fastify.
request.log.debug
Fastify
preHandlerhook that logs incoming request details:Intended to be registered via:
Uses
request.log.debugso each log record is automatically correlated with the request ID assigned by Fastify.