@s9y/fastify-request-logging
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Fastify request logging

Installation

Install @s9y/fastify-request-logging with npm

# npm
npm install @s9y/fastify-request-logging

# pnpm
pnpm install @s9y/fastify-request-logging

# yarn
yarn add @s9y/fastify-request-logging

Usage

Basic example

import fastifyRouteLogging from "@s9y/fastify-request-logging"

const fastify = Fastify({ logger: true, disableRequestLogging: true })
await fastify.register(fastifyRouteLogging, { logLevel: "info" })

fastify.get("/", async () => ({ hello: "world" }))
await fastify.listen({ port: 3000 })

Development

Start example fastify server with @s9y/fastify-request-logging.

pnpm dev:example

Run some requests.

curl 'http://localhost:3000/?test=1'

Readme

Keywords

none

Package Sidebar

Install

npm i @s9y/fastify-request-logging

Weekly Downloads

2

Version

0.2.0

License

none

Unpacked Size

8.94 kB

Total Files

15

Last publish

Collaborators

  • schizofreny
  • panzelva
  • bender