1.0.10 • Published 4 years ago

fastify-api-logger v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
4 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

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago