1.0.10 • Published 3 years ago

fastify-api-logger v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

fastify-api-logger

js-standard-style

Simple and straightforward API request/response single line data logging for Fastify.

Install

npm install --save fastify-api-logger

Usage

const fastify = require('fastify')

fastify.register(require('fastify-api-logger'), {
  user: 'userId',
  level: 'debug',
  prettyPrint: true, // You may want to turn off prettyPrint in production
  sensitiveUrls: [], // Ignore sensitive URLs
})

// log format:
// [ip] [user id?] [method] [status code] [path] [response time] [request payload?] [reply payload]

Demo

fastify-api-logger

License

Licensed under MIT

1.0.9

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago